update.chantrics {chantrics} | R Documentation |
Update, re-fit and re-adjust a Model Call
Description
update.chantrics()
will update a model that has been adjusted by
adj_loglik()
. It passes all arguments to the standard stats::update()
function.
Usage
## S3 method for class 'chantrics'
update(object, ...)
Arguments
object |
A |
... |
Additional arguments to the call, passed to |
Details
The function cannot change any arguments passed to the adj_loglik()
function. To change any of these arguments, re-run adj_loglik()
.
Passing evaluate = FALSE
is not supported, if this is required,
run stats::update()
on the unadjusted object.
Value
The fitted, adjusted "chantrics"
object.
See Also
Examples
# from Introducing Chandwich.
set.seed(123)
x <- rnorm(250)
y <- rnbinom(250, mu = exp(1 + x), size = 1)
fm_pois <- glm(y ~ x + I(x^2), family = poisson)
fm_pois_adj <- adj_loglik(fm_pois)
fm_pois_small_adj <- update(fm_pois_adj, formula = . ~ . - I(x^2))
summary(fm_pois_small_adj)
fm_pois_smallest_adj <- update(fm_pois_adj, formula = . ~ 1)
summary(fm_pois_smallest_adj)
[Package chantrics version 1.0.0 Index]