| predict.sbm | R Documentation |
Generates predicted underlying averages from a size biased model, given a set of covariates if these are used in the model.
## S3 method for class 'sbm'
predict(object, newdata = NULL, reps = 999, ...)
object |
A size biased model fit of class |
newdata |
A dataframe of covariate values with fields matching
covariates used in |
reps |
Integer giving the number of random draws for variance estimation. |
... |
Additional arguments (unused). |
When newdata is missing, make_table is used to
generate a dataframe of covariates at which to predict, based on the
model formula and covariate data.
A dataframe of predictions with fields est (estimated average),
se (estimated standard error), and lcl, ucl (lower and
upper 95 percent confidence limits).
data(BCI_speed_data)
agoutiData <- subset(BCI_speed_data, species=="agouti")
lmod_mass <- sbm(speed~mass, agoutiData, pdf="lnorm")
nd <- data.frame(mass = c(1, 10, 100))
predict(lmod_mass, nd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.