Description Usage Arguments Details Value Examples
predict.vws
Returns predicted values and standard errors for new data
ARMA errors
1 2 |
object |
an object of class |
se.fit |
return standard errors or not |
n.ahead |
number of periods ahead to predict |
data |
the original data |
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.
the imput object is returned silently
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")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.