predict.vws: Predict using a fitted vws model

Description Usage Arguments Details Value Examples

Description

predict.vws Returns predicted values and standard errors for new data ARMA errors

Usage

1
2
## S3 method for class 'vws'
predict(object, newxreg = NULL, se.fit = TRUE, ...)

Arguments

object

an object of class vws

se.fit

return standard errors or not

n.ahead

number of periods ahead to predict

data

the original data

Details

Supplied a vws model and a new dataset it predicts n periods ahead. Not that n must equal the number of rows in the new dataset.

Value

the imput object is returned silently

Examples

1
2
3
4
5
eu<-data.frame(EuStockMarkets)
eu$date<-seq.Date(from = as.Date('2014-01-30'), by = 'day', length.out = nrow(eu))
reg<-vws(diff(DAX, 1)~diff(CAC,1)+diff(SMI,1)+lag(diff(SMI,1),-5), ar=1, ma = 0, 
   data = subset(eu, subset = date>'2019-01-01'), datecolumn = "date")
predict.vws(reg, n.ahead = 13, dataset = eu, newxreg = getxreg(reg, subset(eu, date>="2019-02-20")))

bjorn81/vws documentation built on May 16, 2019, 4:54 p.m.