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
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!
Well, how about something like
. 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
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/