update.chantrics() will update a model that has been adjusted by adj_loglik(). It passes all arguments to the standard stats::update() function.

# S3 method for chantrics
update(object, ...)

Arguments

object

A "chantrics" returned by adj_loglik().

...

Additional arguments to the call, passed to stats::update() to update the original model specification.

Value

The fitted, adjusted "chantrics" object.

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.

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)
#> MLE SE adj. SE #> (Intercept) 1.0550 0.04049 0.08111 #> x 0.9017 0.02884 0.06939
fm_pois_smallest_adj <- update(fm_pois_adj, formula = . ~ 1) summary(fm_pois_smallest_adj)
#> MLE SE adj. SE #> (Intercept) 1.447 0.03067 0.1109