Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MJacobs1985/7e20f88a56f49f9bbbe7a6b5b367a446 to your computer and use it in GitHub Desktop.
Save MJacobs1985/7e20f88a56f49f9bbbe7a6b5b367a446 to your computer and use it in GitHub Desktop.
VO2i_methode1 = fcast$fcst[1]; VO2i_methode1
x = VO2i_methode1$VO2i_methode1[,1]; x
VO2i_methode1inv =ts(c(mymts[,1], x))
plot(VO2i_methode1inv)
fit = nnetar(mymts[,1]);fit
nnetforecast <- forecast(fit, h = 400, PI = T)
plot(nnetforecast)
fit2 = nnetar(mymts[,1], xreg = mymts[,2])
nnetforecast2 <- forecast(fit2, h = 400, xreg = mymts[,2], PI = T)
plot(nnetforecast2)
ggplot(dataset, aes(ElapsedTime, VO2cdi, color=ID)) +
geom_line(stat="identity") +
ylab("VO2 cdi") +
gghighlight(max(VO2cdi) > 220,
max_highlight = 4,
use_direct_label = TRUE) +
theme_minimal() +
theme(legend.position = 'none')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment