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

A companion function to `gpdpgrow`

1 2 3 | ```
## S3 method for class 'gpdpgrow'
predict_functions(object, J = 500, test_times,
time_points = NULL, sn_order = NULL, ...)
``` |

`object` |
Object of class |

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

`test_times` |
A numeric vector holding test times at which to predict GP function values
Will use the estimated covariance parameters from the training data to predict
functions at the test_times for the |

`time_points` |
Inputs a vector of common time points at which the collections of functions were
observed (with the possibility of intermittent missingness). The length of |

`sn_order` |
An integer vector of length, |

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

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

Intended as a companion function for `gpdpgrow`

for prediction

Terrance Savitsky tds151@gmail.com

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 | ```
## 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_gp = gpdpgrow(y = y_short
n.iter = 50,
n.burn = 25,
n.thin = 1,
n.tune = 0)
## Prediction Model Runs
T_test <- 4
T_yshort <- ncol(y_short)
pred_gp <- predict_functions( object = res_gp,
test_times = (T_yshort+1):(T_yshort+T_test) )
## plot estimated and predicted functions
plot_gp <- predict_plot(object = pred_gp,
units_label = cps$st,
single_unit = FALSE,
credible = TRUE)
## 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.