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

accuracy_stat: Small inconsistency in output names #29

Open
MatthieuStigler opened this issue Dec 6, 2020 · 0 comments
Open

accuracy_stat: Small inconsistency in output names #29

MatthieuStigler opened this issue Dec 6, 2020 · 0 comments
Labels

Comments

@MatthieuStigler
Copy link
Owner

Some called x and some x_small?

library(tsDyn)
#> Registered S3 method overwritten by 'quantmod':
#>   method            from
#>   as.zoo.data.frame zoo
x <- log10(lynx)
x_small <- x[1:100]
mod_small <- list()
mod_small[["linear"]] <- linear(x_small, m=2)
mod_small[["setar"]] <- setar(x_small, m=2, thDelay=1, trace = FALSE)
#> Warning: Possible unit root in the high regime. Roots are: 1 1
mod_small[["lstar"]] <- lstar(x_small, m=2, thDelay=1, trace = FALSE)
mod_small[["aar"]] <- aar(x_small, m=2)

pred_rolls_1 <- lapply(mod_small, predict_rolling, n.ahead=1, newdata=x[101:114])
sapply(pred_rolls_1, accuracy_stat)
#>      linear     setar      lstar      aar       
#> var  "x"        "x_small"  "x_small"  "x"       
#> ME   0.05258699 0.02826967 0.03237135 0.03953898
#> RMSE 0.1328027  0.06883358 0.07287524 0.09035348
#> MAE  0.1148975  0.0477577  0.05523015 0.067775  
#> MPE  1.478991   0.8449191  1.027387   1.241795  
#> MAPE 3.886218   1.57141    1.852648   2.294182

Created on 2020-12-05 by the reprex package (v0.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant