get_preds | R Documentation |
Function to extract the estimated value of f (the systematic component of the model) from an HPR model. For posterior predictions, use post_predict.
get_preds(object = NULL, alpha = 0.05)
object |
The results object from a run of hpr. |
alpha |
The uncertainty level for the values of f; the default is 0.05 (which corresponds to 95% credible intervals). |
A dataframe with N rows (corresponding to the rows of X, Z) and columns:
the mean of the posterior samples of f
the median of the posterior samples of f
the alpha/2 percentile of the posterior samples of f
the 1-alpha/2 percentile of the posterior samples of f
X <- as.matrix(dat$Day, ncol = 1)
y <- dat$Temperature
mymodel <- hpr(y = y, X = X, family = "gaussian")
my_f <- get_preds(mymodel)
my_f$x <- dat$Day
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.