Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: clear estimated coefficient matrix


From   natasha agarwal <agarwana2@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: clear estimated coefficient matrix
Date   Wed, 20 Mar 2013 13:17:39 +0530

Dear All,

I want to estimate production function for each industry and calculate
the predicted output for each industry. To do so, I estimate the
following regressions

levpet lnrval if inm==1, free(lnw) proxy(lnb) capital(lnk) valueadd
gen yhat1 = _b[lnk] * lnk + _b[lnw]* lnw if inm==1

levpet lnrval if inm==2, free(lnw) proxy(lnb) capital(lnk) valueadd
gen yhat2 = _b[lnk] * lnk + _b[lnw]* lnw if inm==2

however yhat2 takes _b of the regression where inm==1 and not inm==2.

I tried using clear matrix, scalar drop _all, but the results do not change.

Can you please help me with the same ?

Thanks,
Natasha Agarwal
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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