Bookmark and Share

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: How to get coefficient and R square from time series regression


From   Jorge Eduardo Pérez Pérez <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: How to get coefficient and R square from time series regression
Date   Fri, 20 Sep 2013 16:51:56 -0400

What about -statsby-?

statsby beta=_b[NIBE_RSL] rsq=e(r2), by(id) saving(stats) : capture
reg NIBE_RS NIBE_RSL

Results will be saved in stats.dta

--------------------------------------------
Jorge Eduardo Pérez Pérez
Graduate Student
Department of Economics
Brown University


On Fri, Sep 20, 2013 at 2:59 PM, Xixi Lin <[email protected]> wrote:
>
> Hi,
>
> The following is the code I am using to generate coefficient and R
> square, but it gives errors as:invalid numlist has too many elements
>
> gen EQ1= .
> gen EQ2= .
> tsset Period
> foreach z of numlist 1/1894{
> capture reg NIBE_RS NIBE_RSL if ID==`z'
> replace EQ1=_b[NIBE_RSL] if ID==`z'
> replace EQ2=e(r2) if ID==`z'
> }
>
> Does anyone knows how to fix it? Thanks.
>
> Best,
> Xixi Lin
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index