Learn R Programming

gamlss (version 4.2-4)

prof.dev: Plotting the Profile Deviance for one of the Parameters in a GAMLSS model

Description

This functions plots the profile deviance of one of the (four) parameters in a GAMLSS model. It can be used if one of the parameters mu, sigma, nu or tau is a constant (not a function of explanatory variables) to obtain a profile confidence intervals.

Usage

prof.dev(object, which = NULL, min = NULL, max = NULL, 
        step = NULL, length = 7, startlastfit = TRUE, 
        plot = TRUE, perc = 95, ...)

Arguments

object
A fitted GAMLSS model
which
which parameter to get the profile deviance e.g. which="tau"
min
the minimum value for the parameter e.g. min=1
max
the maximum value for the parameter e.g. max=20
step
how often to evaluate the global deviance (defines the step length of the grid for the parameter) e.g. step=1
length
the length if step is not set, default equal 7
startlastfit
whether to start fitting from the last fit or not, default value is startlastfit=TRUE
plot
whether to plot, plot=TRUE or save the results, plot=FALSE
perc
what % confidence interval is required
...
for extra arguments

Value

  • Return a profile plot (if the argument plot=TRUE) and an ProfLikelihood.gamlss object if saved. The object contains:
  • valuesthe values at the grid where the parameter was evaluated
  • funthe function which approximates the points using splines
  • minthe minimum values in the grid
  • maxte maximum values in the grid
  • max.valuethe value of the parameter maximising the Profile deviance (or GAIC)
  • CIthe profile confidence interval (if global deviance is used)
  • criterionwhich criterion was used

Warning

A dense grid (i.e. small step) evaluation of the global deviance can take a long time, so start with a sparse grid (i.e. large step) and decrease gradually the step length for more accuracy.

Details

This function can be use to provide likelihood based confidence intervals for a parameter for which a constant model (i.e. no explanatory model) is fitted and consequently for checking the adequacy of a particular values of the parameter. This can be used to check the adequacy of one distribution (e.g. Box-Cox Cole and Green) nested within another (e.g. Box-Cox power exponential). For example one can test whether a Box-Cox Cole and Green (Box-Cox-normal) distribution or a Box-Cox power exponential is appropriate by plotting the profile of the parameter tau. A profile deviance showing support for tau=2 indicates adequacy of the Box-Cox Cole and Green (i.e. Box-Cox normal) distribution.

References

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. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).

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.

See Also

gamlss, prof.term

Examples

Run this code
data(abdom)
h<-gamlss(y~pb(x), sigma.formula=~pb(x), family=BCT, data=abdom) 
prof.dev(h,"nu",min=-2.000,max=2)
rm(h)

Run the code above in your browser using DataLab