refit_model {asympDiag} | R Documentation |
Refit Model
Description
Refit a model with a new response.
Usage
refit_model(object, newresp, ...)
Arguments
object |
A model. |
newresp |
the new response, may be a vector or a matrix. |
... |
other arguments passed to |
Details
This function uses newresp
to refit object
replacing its old response variable.
If the class is merMod
it uses refit
, otherwise uses stats::update()
.
The default method tries to update the model response using it's stats::model.frame()
,
if it errors it tries to update the model by inserting the newresp
directly into the object formula.
Value
A model with same class as object
.
[Package asympDiag version 0.3.1 Index]