Description Usage Arguments Author(s) References See Also Examples
update
will update and (by default) re-fit a model. It does this by extracting the call stored in the object, updating the call and (by default) evaluating that call. Sometimes it is useful to call update with only one argument, for example if the data frame has been corrected.
1 2 |
object |
An existing fit from a |
mformula |
Changes to the formula of the mean submodel - see update.formula for details. |
dformula |
Changes to the formula of the dispersion submodel - see update.formula for details. |
... |
Additional arguments to the call, or arguments with changed values. Use |
Karl Wu Ka Yui (karlwuky@suss.edu.sg)
Chambers, J. M. (1992). Linear models. Chapter 4 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Example in jmdem(...): Update the dispersion fitting based on Pearson
## residuals and change from Nelder-Mead to BFGS as optimisation method.
MyData <- simdata.jmdem.sim(mformula = y ~ x, dformula = ~ z,
mfamily = poisson(),
dfamily = Gamma(link = "log"),
beta.true = c(0.5, 4),
lambda.true = c(2.5, 3), n = 100)
fit <- jmdem(mformula = y ~ x, dformula = ~ z, data = MyData,
mfamily = poisson, dfamily = Gamma(link = "log"),
dev.type = "deviance", method = "CG")
update(fit, dev.type = "pearson", method = "BFGS")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.