predict.fastVAR.SparseVARX: SparseVARX Predict

Description Usage Arguments Examples

View source: R/SparseVARX.R

Description

Predict n steps ahead from a fastVAR.SparseVARX object

Usage

1
2
3
  ## S3 method for class 'fastVAR.SparseVARX'
 predict(sparseVARX, xnew,
    n.ahead = 1, threshold, ...)

Arguments

sparseVARX

an object of class fastVAR.SparseVARX returned from SparseVARX

xnew

a matrix of future values for the exogenous inputs. Should contain n.ahead rows

n.ahead

number of steps to predict

threshold

threshold prediction values to be greater than this value

...

extra parameters to pass into the coefficients method for objects of type fastVAR.VAR

Examples

1
2
3
data(Canada)
  x = matrix(rnorm(84*4), 84, 4)
  predict(SparseVARX(Canada, x = x, p = 3, b = 2), xnew=matrix(rnorm(2*4),2,4), n.ahead=2)

jeffwong/fastVAR documentation built on May 19, 2019, 4:02 a.m.