Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: changing beta coefficients


From   Lars Kroll <lars@climweb.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: changing beta coefficients
Date   Thu, 14 Apr 2005 10:25:33 +0200

Peter Haan schrieb:

dear stata list,

I have the following question:

Is it possibe to change the estimated vector of beta coefficients by hand.
I want to predict with a slightly different beta vector than the estimated,
The idea is to replace the estimated vector e(b) by an artificial e(b*) and then to use the command pred,
however, as far as I know I cannot change e(b).

thanks for your help,
peter


*
* 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/

Hello Peter,

try this:

sysuse auto,clear

regress price headroom

matrix __b= e(b)

svmat __b

matrix list __b

* New effect of headroom = b(headroom)/2
* b2 is _cons

gen myprice = __b2 + (__b1/2)* headroom


Yours,
Lars


--
____________________________
Lars E. Kroll
UNI 030 83857614
RKI 030 45473307
TEL 030 25587610
0176 23131352
FAX 069 13306720084
WEB www.climweb.de/privat
*
* 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/




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