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 splinesigma.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 fdata=aids
subset
) or for a weighted likelihood analysis where
the contribution of the observatiomethod=RS()
will use the Rigby and Stasinopoulos algorithm,
method=CG()
will use the Cole and Green algorithm and
mixed(2,10)
mu.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")
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