if (FALSE) {
library(growfunctions)
data(cps)
y_short <- cps$y[,(cps$yr_label %in% c(2010:2013))]
t_train <- ncol(y_short)
N <- nrow(y_short)
t_test <- 4
## Model Runs
res_gmrf = gmrfdpgrow(y = y_short,
q_order = c(2,4),
q_type = c("tr","sn"),
n.iter = 100,
n.burn = 50,
n.thin = 1)
## Prediction Model Runs
T_test <- 4
pred_gmrf <- predict_functions( object = res_gmrf,
J = 1000,
T_test = T_test )
## plot estimated and predicted functions
plot_gmrf <- predict_plot(object = pred_gmrf,
units_label = cps$st,
single_unit = TRUE,
credible = FALSE)
}
Run the code above in your browser using DataLab