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

# Re: st: non linear regression

 From Austin Nichols To statalist@hsphsun2.harvard.edu Subject Re: st: non linear regression Date Mon, 6 Jul 2009 09:58:20 -0400

```somsupa Nopprach<nmayecon31@yahoo.com> :
-nl- will ignore explanatory variables after the first, since log4
uses only one x, so your regression only uses x1.  For example:

sysuse auto
nl log4 weight length, nolog
nl log4 weight length mpg, nolog
tw function _b[b0]+_b[b1]/(1+exp(-_b[b2]*(x-_b[b3])))

If you want a multivariate version, you need to program it yourself.
Or add 2 to your dependent variable, and divide by 4, so it lies in
the unit interval, then use -glm- with family(binomial), link(logit),
and robust VCE; see http://www.stata.com/support/faqs/stat/logit.html

On Sun, Jul 5, 2009 at 12:02 AM, somsupa Nopprach<nmayecon31@yahoo.com> wrote:
> Dear Everyone,
>
>  my dependent variable continuously range from -2 to 2. so, i must use logistic function to limit my estimated  value of y.
>  I would like to run nonlinear(logistic) function . I read the manual in the stata version 8 and think  i should use -nl- command . i use
> nl log4 y x1 x2 x3 x4 x5 x6 , initial(b0 -2 b1 4)
>
> but when i run the coefficient is come out only four parameters of beta of logistic function, not the estimated coefficient for each of my independent variables.
>
>  I would like to see the nonlinear relationship between my y and my xs. Could anybody please give me some advice regarding command in stata.

*
*   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–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index