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: saving residuals for many regressions


From   "G Livesey" <[email protected]>
To   <[email protected]>
Subject   RE: st: saving residuals for many regressions
Date   Fri, 26 Nov 2010 22:15:14 -0000

Maarten, Rodrigo

I looked at this and got the same answer, all resids having periods-- but
only when the program did not run through fully.

Rodrigo, 

I suggest ensuring Maarten's example is copied fully-- and executed fully.
If you have to edit, try to start afresh, but ensure graphs are not saved
when starting afresh --use for example, command: graph drop _all.

When the programme runs though fully then 'resid' includes  residuals for
each level in a single column. If you wanted them in separate columns then
include:

predict resid_`lev' if e(sample),resid 

immediately after the command to predict resid_t, but this is not a very
efficient way to store the information.

Hope this helps.


Geoff. L.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Maarten buis
Sent: 26 November 2010 17:23
To: [email protected]
Subject: Re: st: saving residuals for many regressions


--- On Fri, 26/11/10, Rodrigo Briceño wrote:
> the set of residuals for each regression is replaced each time that 
> the loop started again: at the end Iam just able to get the last set 
> of residuals (from my last regression)

Not true, look again at the code I gave you, in particular
the various -if- conditions. What is droped is resid_t, 
while the variable resid contains the residuals for each
of the estimation samples. So the values in resid for
those observations with rep78 == 2, are from the regression
in rep78 == 2, while the values in resid for the observations with rep78 ==
3 refer to the regression on the sub-sample where rep78 == 3, etc. 

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------




      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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