Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: question from a new user


From   <[email protected]>
To   <[email protected]>
Subject   Re: st: question from a new user
Date   Fri, 10 Feb 2006 12:39:56 -0300 (ART)

with the command return list you can see how call the results
example
 sum rgdpl

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       rgdpl |       152    4626.693    2138.292    1692.86   11167.49

 return list

scalars:
                 r(N) =  152
             r(sum_w) =  152
              r(mean) =  4626.692887155633
               r(Var) =  4572291.459771345
                r(sd) =  2138.291715311862
               r(min) =  1692.859985351563
               r(max) =  11167.490234375
               r(sum) =  703257.3188476563


> I am a relatively new user of Stata having used SAS for many years. I
> know that when you run a regression in Stata it produces a whole series
> of results that are stored under e( ) e.g. R squared, N, RSS etc. The
> problem I am having is I can't figure out how to access those stored
> results. I want to use the stored results to calculate an LM statistic.
> I can do this manually using the results and the display command but
> there must be a way of programing Stata to do this task.
>
> Here is what I want to do. I run a restricted regression and then obtain
>  the residuals. Next I regress the residuals on the independent
> variables  from the unrestricted model. N times the R square from this
> equation is  an LM statistic.
>
> Rudy



*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index