fit |

Computes (n-period ahead) static forecasts of the VAR or VEC equation.

fit computes the static forecast of variables and all observations in a specified sample. In some settings, you may instruct forecast to compare the forecasted data to actual data, and to compute summary statistics.

Syntax

var_name.fit(options) f_pattern [se_pattern]

You should enter a naming suffix for the forecast series and, optionally, a naming suffix for the series containing the standard errors. Forecast standard errors are currently only available via simulation.

Options

g | Graph the forecasts in individual graphs - one per dependent variable. |

m | Graph the forecasts in a combined graph. |

e | Produce the forecast evaluation table. |

f = arg (default= “actual”) | Out-of-forecast-sample fill behavior: “actual” (fill observations outside the forecast sample with actual values for the fitted variable), “na” (fill observations outside the forecast sample with missing values). |

streps=integer | Number of simulation repetitions. Only applicable if a se_pattern is provided. |

f=number | Fraction of failed repetitions before stopping. Only applicable if a se_pattern is provided. |

prompt | Force the dialog to appear from within a program. |

p | Print view. |

Examples

The following lines:

smpl 1970q1 1990q4

var var1.ls 1 3 con inc

smpl 1991q1 1995q4

var1.fit(m) _f _se

estimate a VAR over the period 1970Q1–1990Q4, and then computes static forecasts for the period 1991Q1–1995Q4, and plots the forecasts as line graphs.

Cross-references

See “Forecasting” for a discussion of forecasting from VARs variance decompositions

See also Var::forecast.