Rolling regression with de-meaned variables
Posted: Wed Jun 30, 2010 6:03 pm
I understand how to do the basic rolling regression program using the FOR loop.
Could someone please indicate how to conduct a regression of de-meaned values using a rolling window? I need to subtract the mean from both the dependent and independent variables. In this case the mean is the sample mean in each sub-sample (each window).
eg. y - ybar = m(x-xbar) + residual
Thanks!
Could someone please indicate how to conduct a regression of de-meaned values using a rolling window? I need to subtract the mean from both the dependent and independent variables. In this case the mean is the sample mean in each sub-sample (each window).
eg. y - ybar = m(x-xbar) + residual
Thanks!