-
-
Save vftools/65f73679dcfd2e680612 to your computer and use it in GitHub Desktop.
Example code for using the Time Series Analysis Tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(devtools) | |
devtools::install_github("veneficusnl/vf_model_time_series") | |
library(vfmodels.timeseries) | |
data('EIA') | |
train <- 1:(nrow(data) - 5) | |
labels <- data$Date | |
x <- data$Value | |
model <- get_model(x = x,method = 'time_series', lag = 2, labels = labels, family = gaussian('log'), train = train ) | |
summary(model) | |
plot(model) | |
#Prediction is still very unreliable and should be looked at closer. | |
res <- predict(model, x = x, n.ahead = 2, labels = labels, train = train) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment