gamlss()
is very similar to the gam()
function in S-plus (now also in R in package gam
), but
can fit more distributions (not only the ones belonging to the exponential family) and can model all the parameters of the
distribution as functions of the explanatory variables (e.g. using linear, non-linear, smoothing, loess and random effects terms).This implementation of gamlss()
allows modelling of up to four
parameters in a distribution family, which are conventionally called mu
, sigma
, nu
and tau
.
The function gamlssNews()
shows what is new in the current implementation.
gamlss(formula = formula(data), sigma.formula = ~1,
nu.formula = ~1, tau.formula = ~1, family = NO(),
data = sys.parent(), weights = NULL,
contrasts = NULL, method = RS(), start.from = NULL,
mu.start = NULL, sigma.start = NULL,
nu.start = NULL, tau.start = NULL,
mu.fix = FALSE, sigma.fix = FALSE, nu.fix = FALSE,
tau.fix = FALSE, control = gamlss.control(...),
i.control = glim.control(...), ...)
is.gamlss(x)
gamlssNews()
pb()
for penalised beta splines, cs
for smoothing splinessigma.formula=~cs(x,df=5)
. It can be abbreviated to sigma.fo=~cs(x,df=5)
.nu.fo=~x
tau.fo=~cs(x,df=2)
gamlss.family
object, which is used to define the distribution and the link functions of the various parameters.
The distribution families supported by gamlss()
can be fodata=aids
subset
) or for a weighted likelihood analysis where
the contribution of the observationsmethod=RS()
will use the Rigby and Stasinopoulos algorithm,
method=CG()
will use the Cole and Green algorithm and
mixed(2,10)
wimu.start=4
sigma.start=1
nu.start=3
tau.start=2
mu.fix=FALSE
sigma.fix=FALSE
nu.fix=FALSE
tau.fix=FALSE
gamlss.control
functionglim.control
functionmu
, sigma
, nu
, tau
mu
should be fitted before a model for sigma
is fittedgamlss.family
. The systematic part of the model is
expanded to allow modelling not only of the mean (or location) parameter,
but also of the other parameters of the distribution of y, as
linear parametric and/or additive nonparametric (smooth)
functions of explanatory variables and/or random effects terms.
Maximum (penalized) likelihood estimation is used to fit the
(non)parametric models. A Newton-Raphson/Fisher scoring algorithm
is used to maximize the (penalized) likelihood. The additive terms
in the model are fitted using a backfitting algorithm.
is.gamlss
is a short version is is(object,"gamlss")
Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R.
Accompanying documentation in the current GAMLSS help files, (see also
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,
gamlss.family
, pdf.plot
, find.hyper
data(abdom)
mod<-gamlss(y~pb(x),sigma.fo=~pb(x),family=BCT, data=abdom, method=mixed(1,20))
plot(mod)
rm(mod)
Run the code above in your browser using DataLab