Description Usage Arguments See Also Examples
update
(i.e., update.cmp
) will update and (by-default) re-fit a model. It is
identical to update
in the stats
package.
1 2 |
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
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # 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.