You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
predict_rolling does not work with exogenous variables: this is because predict_rolling_1step.nlVar only retrieves the endogenous ones: origSerie <- object$model[,1:k].
Now this will be complicated:
Need to extract position of exo in object$model[,1:k], no easy way so far
object$model returns exo with NAs (check: head(VECM_Exo$model))... maybe problem
exos need to be fed also as exoPred in predict.nlar...
library(tsDyn)
#> Registered S3 method overwritten by 'quantmod':#> method from#> as.zoo.data.frame zoo
data("barry")
barry_pre<-barry[1:300,]
barry_post<-barry[301:324,]
VECM_noExo<-tsDyn::VECM(barry_pre[,1:2],2, r=1,c("none"), beta=NULL,estim="ML", c("none"))
ok<- predict_rolling(VECM_noExo,nroll=18, refit.every=0, n.ahead=18, newdata=barry_post[,1:2] )
VECM_Exo<-tsDyn::VECM(barry_pre[,1:2],2, r=1,c("none"), beta=NULL,estim="ML", c("none"), barry_pre[,3])
predict_rolling(VECM_Exo, nroll=18, refit.every=0, n.ahead=18, newdata=barry_post)
#> Error in rbind(origSerie, newdata): number of columns of matrices must match (see arg 2)
predict_rolling
does not work with exogenous variables: this is becausepredict_rolling_1step.nlVar
only retrieves the endogenous ones:origSerie <- object$model[,1:k]
.Now this will be complicated:
object$model[,1:k]
, no easy way so farobject$model
returns exo with NAs (check:head(VECM_Exo$model)
)... maybe problemexoPred
inpredict.nlar
...Created on 2020-05-14 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: