R/posterior_linpred.R
posterior_linpred-ubmsFit-method.Rd
Extract posterior draws of the linear predictor for a ubmsFit
submodel, possibly transformed by the inverse-link function.
# S4 method for class 'ubmsFit'
posterior_linpred(
object,
transform = FALSE,
submodel,
newdata = NULL,
draws = NULL,
re.form = NULL,
...
)
A fitted model of class ubmsFit
Should the linear predictor be transformed using the inverse link function?
The name of the submodel, as a character string, for which to calculate the linear predictor
Optional data frame of newdata to use when calculating the linear predictor. If not provided, the model matrix is used.
An integer indicating the number of draws to return. The default and maximum number of draws is the size of the posterior sample.
If NULL
, any estimated group-level parameters ("random
effects") are included. If NA
, they are ignored
Currently ignored
A matrix of simulations from the posterior predictive distribution
of the linear predictor. The dimensions are draws
by number of
linear predictor values (e.g., number of sites or number of observations).