laglen |

VAR lag order selection criteria.

Syntax

var_name.laglen(m, options)

You must specify the maximum lag order m for which you wish to test.

Options

vname=arg | Save selected lag orders in named vector. See below for a description of the stored vector. |

mname=arg | Save lag order criteria in named matrix. See below for a description of the stored matrix. |

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

p | Print table of lag order criteria. |

The “vname=” option stores a vector with 5 rows containing the selected lags from the following criteria: sequential modified LR test (row 1), final prediction error (row 2), Akaike information criterion (row 3), Schwarz information criterion (row 4), Hannan-Quinn information criterion (row 5).

The “mname=” option stores a matrix, where if there are no exogenous variables in the VAR; otherwise . The first rows contain the information displayed in the table view, following the same order. The saved matrix has an additional row which contains the lag order selected from each column criterion. The first column (corresponding to the log likelihood values) of the last row is always an NA.

Examples

var var1.ls 1 6 lgdp lm1 lcpi

show var1.laglen(12,vname=v1)

The first line declares and estimates a VAR. The second line computes the lag length criteria up to a maximum of 12 lags and stores the selected lag orders in a vector named V1.

Cross-references

See “Vector Autoregression and Error Correction Models” for a discussion of the various criteria and other VAR diagnostics.

See also Var::testlags.