Given the new covariate data and output from walker,
obtain samples from posterior predictive distribution for future time points.
# S3 method for walker_fit
predict(
object,
newdata,
u,
type = ifelse(object$distribution == "gaussian", "response", "mean"),
...
)A list containing samples from posterior predictive distribution.
An output from walker() or walker_glm().
A data.frame containing covariates used for prediction.
For Poisson model, a vector of future exposures i.e. E(y) = uexp(xbeta). For binomial, a vector containing the number of trials for future time points. Defaults 1.
If "response" (default for Gaussian model), predictions are on the response level
(e.g., number of successes for Binomial case, and for Gaussian case the observational
level noise is added to the mean predictions).
If "mean" (default for non-Gaussian case), predict means (e.g., success probabilities in Binomial case).
If "link", predictions for non-Gaussian models are returned before applying the inverse of the link-function.
Ignored.
plot_predict() for example.