help for staticfc

Compute static forecasts for a recursive rolling regression

staticfc varlist [if exp] [in range]
generate(stub) [
step(integer) init(integer) graph(string) replace title(string) ]

staticfc is for use with time-series data. You must tsset your
data before using staticfc; see help tsset.

varlist may contain time-series operators; see help varlist.

Description

staticfc runs a specified linear regression on a recursive rolling
sample: that is, on a sequence of estimation periods successively including each
additional period. It then generates an out-of-sample, or ex ante, forecast and standard
error of forecast for each estimation period. These variables (along with the
number of degrees of freedom used for each period) are returned. The actual series and its
recursive ex ante forecast may optionally be graphed, along with its 95% confidence interval.

Options

generate(stub) is a required option. It provides the name
of the forecast series to be generated by staticfc. That name is also used
to create two new series, stub_s and stub_n, which respectively contain
the standard error of forecast (stdf; see predict) and the number
of residual degrees of freedom used in each estimation period. Those three variable
names must not be in use.

step(integer) specifies the number of steps ahead for the
ex ante forecast. The default is one period.

init(integer) specifies the number of initial periods that are to be
used in the first estimation sample. The default is 20 periods.

graph(string) specifies that a graph is to be produced and
saved as string.gph. If that file alreads exists, the replace option
should be used. The title(string) option may be used to add a title
to the graph.

Saved results

staticfc does not save any results at this time. Its primary purpose is
to calculate the forecast series.

Examples

. webuse manufac

. tsset

Purely static model:

. staticfc hours caputil lncaputil if tin(1985m1,2008m12), gen(cfc1) graph(fig1) replace

Model with distributed lag of regressor:

. staticfc hours L(1/2).caputil lncaputil if tin(1985m1,2008m12), gen(cfc2) graph(fig2) replace

Vary the number of initial periods to 40:

. staticfc hours L(1/2).caputil lncaputil if tin(1980m1,2008m12), init(40) gen(cfc3) graph(fig3) replace

Vary number of steps ahead to 4:

. staticfc hours L(1/2).caputil lncaputil if tin(1985m1,2008m12), step(4) gen(cfc4) graph(fig4) replace

Vary number of steps ahead to 12:

. staticfc hours L(1/2).caputil lncaputil if tin(1985m1,2008m12), step(12) gen(cfc5) graph(fig5) replace

Acknowledgements

Development of this routine was stimulated by a conversation with Jim Stock about the capabilities
of rolling.

Author

Christopher F Baum, Boston College, USA

baum@bc.edu