Rolling window and recursive estimation
Description
rolling2 is identical to the official rolling prefix with one exception. Although not documented as such, official rolling operates separately on each panel of a panel data set. Under some circumstances, you may want to estimate a model (such as a linear regression) pooling all data available during a fixed window, generating a single set of coefficients. This can be achieved by rolling2 with the onepanel option. Without that option, rolling2 produces the same results as official rolling.
Options
onepanel specifies that a single model is to be be estimated over all panels of a panel dataset, ignoring the setting of the panelvar.
Examples
. webuse grunfeld
. rolling2 _b _se, window(5) onepanel: regress invest mvalue kstock
Author
Christopher F. Baum (baum@bc.edu), Boston College
Also see help for rolling