Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Regression loop and coefficient ooutput


From   "kelly johnson" <[email protected]>
To   [email protected]
Subject   st: Regression loop and coefficient ooutput
Date   Mon, 03 Oct 2005 10:59:11 -0400

hi,
suppose i have 100 variables (var1-var100). how can i write a simple loop to regress all the variables on var1, one at a time?

specifically, i want:

reg var1 var2
reg var1 var3
.
.
.
reg var1 var100

additionally, how can i display ONLY the coefficients and their p-values of each regression in my log file? (all i want is a list of the relevent coefficients and their corresponding p-values). thank you!

kelly

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

*
* 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