Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VARpred does not return pred when output=FALSE #3

Open
lcallot opened this issue Jan 8, 2019 · 0 comments
Open

VARpred does not return pred when output=FALSE #3

lcallot opened this issue Jan 8, 2019 · 0 comments

Comments

@lcallot
Copy link

lcallot commented Jan 8, 2019

The forecast is assigned to pred within the if (output) {...} statement, so that pred=NULL is returned when the argument output=FALSE is set in the call. The assignment of pred should probably be moved outside if (output){...}.

MTS/R/MTS.R

Line 885 in 26ecbaf

pred=px[(orig+1):(orig+h),]

data("mts-examples",package="MTS")
gdp=log(qgdp[,3:5])
zt=diffM(gdp)
m1=VAR(zt,p=2, output=FALSE)
vp=VARpred(m1,4, output=FALSE)
vp
$pred
NULL

$se.err
            [,1]        [,2]        [,3]
[1,] 0.005314548 0.005399830 0.005974661
[2,] 0.005803884 0.007165152 0.007076819
[3,] 0.006201846 0.007672211 0.007344704
[4,] 0.006484131 0.007784789 0.007442406

$rmse
            [,1]        [,2]        [,3]
[1,] 0.005461328 0.005548966 0.006139673
[2,] 0.038966588 0.078130775 0.063052185
[3,] 0.036637288 0.045955913 0.033289797
[4,] 0.031926258 0.023140137 0.021204768
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant