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



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


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.



*   For searches and help try:

Cameron Hooper <>
University of Michigan Business School
701 Tappan St., Ann Arbor, MI 48109
phone: 734-615-4178 fax: 734-936-0282
Public Key:
* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index