Description Usage Arguments Value Note Author(s) See Also Examples

A companion function to `gmrfdpgrow`

1 2 | ```
## S3 method for class 'gmrfdpgrow'
predict_functions(object, J = 500, T_test, ...)
``` |

`object` |
Object of class |

`J` |
Scalar denoting number of draws to take from posterior predictive for each unit.
Defaults to |

`T_test` |
The number of equally-spaced time points to predict the iGMRF functions ahead of
of the functions estimated at |

`...` |
further arguments passed to or from other methods. |

out A list object containing containing two matrices; the first is a P x (N*T) matrix of predicted function values for each of P sampled iterations. N is slow index and denotes the number of experimental units. The second matrix is an N x T average over the P sampled draws, composed in Rao-Blackwellized fashion.

Intended as a companion function for `gmrfdpgrow`

for prediction

Terrance Savitsky [email protected]

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ```
## Not run:
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)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.