Learn R Programming

gamlss (version 4.2-4)

fittedPlot: Plots The Fitted Values of a GAMLSS Model

Description

This function, applicable only to a models with a single explanatory variable, plots the fitted values for all the parameters of a GAMLSS model against the (one) explanatory variable. It is also useful for comparing the fits for more than one model.

Usage

fittedPlot(object, ..., x = NULL, color = TRUE, line.type = FALSE, xlab = NULL)

Arguments

object
a fitted GAMLSS model object(with only one explanatory variable)
...
optionally more fitted GAMLSS model objects
x
The unique explanatory variable
color
whether the fitted lines plots are shown in colour, color=TRUE (the default) or not color=FALSE
line.type
whether the line type should be different or not. The default is color=FALSE
xlab
the x-label

Value

  • A plot of the fitted values against the explanatory variable

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, centiles, centiles.split

Examples

Run this code
data(abdom)
h1<-gamlss(y~pb(x), sigma.formula=~x, family=BCT, data=abdom)
h2<-gamlss(y~pb(x), sigma.formula=~pb(x), family=BCT, data=abdom)
fittedPlot(h1,h2,x=abdom$x)
rm(h1,h2)

Run the code above in your browser using DataLab