Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Threshold regression using NL - How to specify indicator variable?


From   Ophelie Desmarais <ophelie.desmarais@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Threshold regression using NL - How to specify indicator variable?
Date   Mon, 3 Sep 2012 19:03:12 +0100

Dear list,

I would like to create a simple non-linear threshold regression:

y = a1+a2*X*I(X>Z)+a3*X*I(X<Z)

where in the linear case a2=a3. Z is unknown and to be estimated.

Is there anyway to do this with Stata's "nl" command? The tutorial
suggests that you can run relatively straightforward models like:  nl
(y = {b0=1}*(1 - exp(-1*{b1=0.1}*x)))

i.e. you just define the functional form in command line. But I am not
aware of an operator for an indicator variable, so I'm not sure how to
do this here.

Any suggestions would be appreciated - I did check the previous posts
and run a Google search, but no success.

Thanks!
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index