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

Re: st: Programming question


From   David Kantor <dkantor@jhu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Programming question
Date   Fri, 04 Mar 2005 15:11:35 -0500

At 01:06 PM 3/4/2005 -0500, Cameron Hooper wrote:
Here is my full problem.
I want to estimate rolling regressions on a firm by firm basis. Then for each regression I want to find the standard deviation of the residuals.
Nick Cox gave you some good advice about using -rollreg-. While I have never used -rollreg-, your problem looks like it might fit into a scheme such as...

levels id, local(idlist)
foreach i of local idlist {
rollreg ... if id==`i'

<plus code to make use of or store the results from each iteration>
}

I hope this helps.
-- David

David Kantor
Institute for Policy Studies
Johns Hopkins University
dkantor@jhu.edu
410-516-5404
*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index