create_varp_data: Create data using a reduced-form VAR

Description Usage Arguments Value Note See Also

View source: R/VAR-1-simulation.R

Description

Given some starting values, coefficients and a sequence of error vectors, create_varp_data will compute a sequence of observables using a simple vector autoregressive process.

Usage

1
create_varp_data(A, Y0, U, nu = 0)

Arguments

A

A (K x Kp) matrix, providing the coeffcients for lag 1 to p with the first row containing the coefficents of the first equation. Parameter p is the maximum lag length and K the number of variables.

Y0

A (K x p) matrix which will be used as starting values. The first column corresponds to the very first time period.

U

A (K x N) matrix, providing the sequence of error vectors.

nu

A (K x 1) vector with the intercept for each equation. The default is zero.

Value

A (K x N+p) matrix holding the observations. The first p columns will be equal to Y0. Column p + 1 will be equal to A \\%*\\% Y0 + U[, 1], where U contains reduced form errors. The final observation of the K variables will be in column N+p.

Note

For a faster implementation, see this solution by Dirk Eddelbuettel.

See Also

Other functions for creating data: create_svar_data


nielsaka/zeitreihe documentation built on March 17, 2020, 8:38 p.m.