predict.stanreg {rstanarm} | R Documentation |
Predict method for stanreg objects
Description
This method is primarily intended to be used only for models fit using
optimization. For models fit using MCMC or one of the variational
approximations, see posterior_predict
.
Usage
## S3 method for class 'stanreg'
predict(
object,
...,
newdata = NULL,
type = c("link", "response"),
se.fit = FALSE
)
Arguments
object |
A fitted model object returned by one of the
rstanarm modeling functions. See |
... |
Ignored. |
newdata |
Optionally, a data frame in which to look for variables with which to predict. If omitted, the model matrix is used. |
type |
The type of prediction. The default |
se.fit |
A logical scalar indicating if standard errors should be
returned. The default is |
Value
A vector if se.fit
is FALSE
and a list if se.fit
is TRUE
.
See Also
[Package rstanarm version 2.32.1 Index]