[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: RE: logistic regression: changing a coefficient
At 09:03 AM 2/15/2005 -0800, Schonlau, Matthias wrote:
Good point. My example failed to say that I have about 100 explanatory
variables. This line
Well, how about something like
gen xb2 = _b[_cons] + -.35*mpg + _b[weight]*weight
is cumbersome in my case - but I' ll think about whether I can automate it
in a loop.
Thanks for your suggestion!
. sysuse auto
(1978 Automobile Data)
. qui logit fore mpg weight
. predict xb, xb
. gen xb2 = xb - _b[mpg]*mpg + -.35*mpg
In other words, let -predict- predict the value using the estimated
coefficients, then subtract the coefficient*var that you want to change,
and then add the different coefficient* var that you want?
Richard Williams, Associate Professor
OFFICE: (574)631-6668, (574)631-6463
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
* For searches and help try: