Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: nlcom for tobit interactions


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: nlcom for tobit interactions
Date   Mon, 10 Nov 2008 09:38:24 +0000 (GMT)

--- Walter Forrest <[email protected]> wrote:
> predictnl seems to be the right option, but when I've run it I've
> received an error message that reads "too many variables specified".
> Any ideas as to what I'm doing incorrectly?
> 
> Here's my code:
> 
> tobit depvar `x1' `x2' `x3', ll
> predict xb if e(sample)
> 
> 
> */
> local big=normal(xb/_b[/sigma])
> local small=normalden(xb/_b[/sigma])
> 
> 
> */ the following gets an error message
>
predictnl=((_b[`x3']*`big')+(1/_b[/sigma])*((_b[`x1']*_b[`x2'])+(_b[`x1']*_b[`x3']*`x1')
> + (_b[`x2']*_b[`x3']*`x2') + (_b[`x3']*_b[`x3']*`x1'*`x2')) *
> `small'), se(inteff_se)

I see two things:
1) xb should be xb()
2) you need to specify the variable in which you store these effects,
something like: 
predictnl eff = ((_b[`x3']* ...

Hope this helps,
Maarten


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index