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: Estimating multiple regression on panel dataset by year, saving and testing results.


From   Chipengovich Shpeng <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Estimating multiple regression on panel dataset by year, saving and testing results.
Date   Sun, 13 May 2012 18:30:16 +0400

Solution
For data like, columns : year var1-varn(stock returns) indexes
correlation of stocks to indexes by year

forval j=1/100 {
forval i=1/11 {
qui reg var`j' mcsi var55 if year==`i'
di "`j'_`i'	{col 10}Beta: " %9.4f  _b[mcsi]  " Beta2: " %9.4f  _b[index2]  "  Rsq: " %9.4f   e(r2)
}
}

Thanks for your help!
*
*   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