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

Re: st: Rolling your own [was: Programming question]


From   Cameron Hooper <chooper@umich.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Rolling your own [was: Programming question]
Date   Fri, 04 Mar 2005 21:19:17 -0500

Scott Merryman wrote:
If you clone -rollreg- and alter line 402 so it reads
local f =`in1' -1

and add line 404 local lower = `lower' -1

you will now get coefficients for observations 1/5.

>  <snip>
Below, is another way of running a rolling regression and calculating the
standard deviation of the residuals.

Hope this helps,
Thank you! This is very helpful.

Cheers,

Cameron





-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
statalist@hsphsun2.harvard.edu] On Behalf Of Cameron Hooper
Sent: Friday, March 04, 2005 3:36 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Programming question

Hi

I agree that rollreg is probably the best solution. I started with Kit
Baum's routine and just got to wondering if I could produce a quick and
dirty solution that would work for my data. Since I knew nothing about
programming in Stata, the dirty aspect has been realized but not the
quick! Still, its been a good learning exercise and thanks to the
replies I've received from people on this list I've learnt a lot in a
short period of time.

Cheers,

Cameron



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


--
Cameron Hooper <chooper@umich.edu>
University of Michigan Business School
701 Tappan St., Ann Arbor, MI 48109
phone: 734-615-4178 fax: 734-936-0282
Public Key: http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0xFCCF8C91
*
* 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