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

Re: st: non linear regression

From   Austin Nichols <>
Subject   Re: st: non linear regression
Date   Mon, 6 Jul 2009 09:58:20 -0400

somsupa Nopprach<> :
-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

On Sun, Jul 5, 2009 at 12:02 AM, somsupa Nopprach<> 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:

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