{smcl}
{* 16nov2006}{...}
{hline}
help for {hi:rolling2}
{hline}
{title:{cmd:Rolling window and recursive estimation}}
{title:Description}
{p}{cmd:rolling2} is identical to the official {cmd:rolling} prefix with one exception.
Although not documented as such, official {cmd: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 {cmd:rolling2} with the
{cmd:onepanel} option. Without that option, {cmd:rolling2} produces the same results
as official {cmd:rolling}.
{title:Options}
{p 0 4}{cmd:onepanel} specifies that a single model is to be be estimated
over all panels of a panel dataset, ignoring the setting of the {cmd:panelvar}.
{title:Examples}
{p 8 12}{stata "webuse grunfeld" :. webuse grunfeld}{p_end}
{p 8 12}{stata "rolling2 _b _se, window(5) onepanel: regress invest mvalue kstock" :. rolling2 _b _se, window(5) onepanel: regress invest mvalue kstock} {p_end}
{title:Author}
{p 0 4} Christopher F. Baum (baum@bc.edu), Boston College
{title:Also see}
help for {help rolling}