fittedPlot: Plots The Fitted Values of a GAMLSS Model

Description Usage Arguments Value Author(s) References See Also Examples

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

1
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

Author(s)

Mikis Stasinopoulos d.stasinopoulos@londonmet.ac.uk, Bob Rigby and Calliope Akantziliotou

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.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.

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, https://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 https://www.gamlss.com/).

See Also

gamlss, centiles, centiles.split

Examples

1
2
3
4
5
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)

Example output

Loading required package: splines
Loading required package: gamlss.data
Loading required package: gamlss.dist
Loading required package: MASS
Loading required package: nlme
Loading required package: parallel
 **********   GAMLSS Version 5.0-2  ********** 
For more on GAMLSS look at http://www.gamlss.org/
Type gamlssNews() to see new features/changes/bug fixes.

GAMLSS-RS iteration 1: Global Deviance = 4787.156 
GAMLSS-RS iteration 2: Global Deviance = 4785.759 
GAMLSS-RS iteration 3: Global Deviance = 4785.72 
GAMLSS-RS iteration 4: Global Deviance = 4785.714 
GAMLSS-RS iteration 5: Global Deviance = 4785.712 
GAMLSS-RS iteration 6: Global Deviance = 4785.712 
GAMLSS-RS iteration 1: Global Deviance = 4771.925 
GAMLSS-RS iteration 2: Global Deviance = 4771.039 
GAMLSS-RS iteration 3: Global Deviance = 4770.999 
GAMLSS-RS iteration 4: Global Deviance = 4770.994 
GAMLSS-RS iteration 5: Global Deviance = 4770.993 

gamlss documentation built on March 31, 2021, 5:10 p.m.