update.cmp | R Documentation |
update
(i.e., update.cmp
) will update and (by-default) re-fit a model. It is
identical to update
in the stats
package.
## S3 method for class 'cmp' update(object, formula., formula_nu., ..., evaluate = TRUE)
object |
an object class 'cmp', obtained from a call to |
formula. |
changes to the existing formula in |
formula_nu. |
changes to the existing formula_nu in |
... |
other arguments passed to or from other methods (currently unused). |
evaluate |
logical; if |
glm.cmp
, update.formula
, cmplrtest
.
# To update the mean regression formula data(takeoverbids) ## Fit full model M.bids.full <- glm.cmp(numbids ~ leglrest + rearest + finrest + whtknght + bidprem + insthold + size + sizesq + regulatn, data = takeoverbids) M.bids.full ## Dropping whtknght M.bids.null <- update(M.bids.full, . ~ . - whtknght) M.bids.null ## To update the dispersion regression formula data(sitophilus) ## Fit full model M.sit.full <- glm.cmp(formula = ninsect ~ extract, formula_nu = ~extract, data = sitophilus) M.sit.full ## Dropping extract from the dispersion regression M.sit.null1 <- update(M.sit.full, formula_nu = ~ . - extract) M.sit.null1 ## To not regress on the dispersion at all M.sit.null2 <- update(M.sit.full, formula_nu = NULL) M.sit.null2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.