| update.gamlss {gamlss} | R Documentation |
update.gamlss is the GAMLSS specific method for the generic function update
which updates and (by default) refits a GAMLSS model.
## S3 method for class 'gamlss'
update(object, formula., ...,
what = c("mu", "sigma", "nu", "tau", "All"),
parameter= NULL, evaluate = TRUE)
object |
a GAMLSS fitted model |
formula. |
the formula to update |
... |
for updating argument in |
what |
the parameter in which the formula needs updating for example "mu", "sigma", "nu" "tau" or "All". If "All" all the formulae are updated. Note that the |
parameter |
equivalent to |
evaluate |
whether to evaluate the call or not |
Returns a GAMLSS call or fitted object.
Mikis Stasinopoulos mikis.stasinopoulos@gamlss.org, Bob Rigby
Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, http://www.jstatsoft.org/v23/i07.
Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.
(see also http://www.gamlss.org/).
print.gamlss, summary.gamlss, fitted.gamlss, coef.gamlss,
residuals.gamlss, plot.gamlss, deviance.gamlss, formula.gamlss
data(aids) # fit a poisson model h.po <-gamlss(y~pb(x)+qrt, family=PO, data=aids) # update with a negative binomial h.nb <-update(h.po, family=NBI) # update the smoothing h.nb1 <-update(h.nb,~cs(x,8)+qrt) # remove qrt h.nb2 <-update(h.nb1,~.-qrt) # put back qrt take log of y and fit a normal distribution h.nb3 <-update(h.nb1,log(.)~.+qrt, family=NO) # verify that it is the same h.no<-gamlss(log(y)~cs(x,8)+qrt,data=aids )