Statalist


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

st: AW: Automating regressions


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Automating regressions
Date   Mon, 8 Jun 2009 16:12:50 +0200

<> 

Employ -statsby- then...

*************

//     Setup
webuse nlswork, clear

gen age2 = age*age
gen ttl_exp2 = ttl_exp*ttl_exp
gen tenure2 = tenure*tenure
gen byte black = race==2

xtset idcode


statsby, by(year) clear : /* 
 */ reg ln_w grade age* ttl_exp* /* 
 */ tenure* black not_smsa south
 
list, noobs
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von max r
Gesendet: Montag, 8. Juni 2009 16:10
An: [email protected]
Betreff: st: Automating regressions

Hi All:

I have a panel dataset, with 1500 panels each with 100 time periods. I
want to run a simple cross-sectional regression for each of the 100
time periods and store the residuals as a separate variable each time.
I can do this one by one using "if time_var==   " at the end of each
regression, wondering if there is  easier way to perform this ?


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