View source: R/other.methods.dma.R
predict.dma | R Documentation |
dma
Model.The function computes predictions based on the model obtained from fDMA
.
## S3 method for class 'dma'
predict(object, newdata, type, ...)
object |
an object of |
newdata |
a |
type |
|
... |
not used |
vector
of forecasted values
wti <- crudeoil[-1,1]
drivers <- (lag(crudeoil[,-1],k=1))[-1,]
ld.wti <- (diff(log(wti)))[-1,]
ld.drivers <- (diff(log(drivers)))[-1,]
m1 <- fDMA(y=ld.wti,x=ld.drivers,alpha=0.99,lambda=0.99,initvar=1,model="dma")
p1 <- predict(object=m1,newdata=ld.drivers,type="backward")
p2 <- predict(object=m1,newdata=ld.drivers[1,],type="forward")
p3 <- predict(object=m1,newdata=ld.drivers[1:3,],type="forward")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.