Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: create variable from regression coefficients
From
Ryan Kessler <[email protected]>
To
[email protected]
Subject
Re: st: create variable from regression coefficients
Date
Mon, 26 Nov 2012 10:50:50 -0500
sysuse auto, clear
bysort rep78: gen time = _n
xtset rep78 time
xtdpdsys mpg price weight, twostep vce(gmm)
gen var = _b[L1.mpg]
On Mon, Nov 26, 2012 at 5:32 AM, Muhammed Altuntas <[email protected]> wrote:
> Dear Statalist,
>
> I am having trouble with what for many of you will be a basic question.
> I want to access regression coefficients as variables for further analysis.
> What I am trying to do is as follows:
>
> 1. Run a system gmm regression and calculate coefficients
> 2. Capture the coefficient for the lagged dependent variable, which is one
> of the independent variables in my model
>
> The lagged dependent variable (which is the independent variable in my
> model) automatically gets the operator “L1.”
>
> I tried the following to solve my problem:
>
> qui xi: xtdpdsys wins_lev4, pre(`modelxy2') twostep vce(gmm);
> matrix b1 = b["_L1_wins_lev4", 1];
> svmat b1;
>
> But this did not work…
> Can you help me?
>
> Many thanks
> Mehmet Altun
>
> *
> * 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/
*
* 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/