centilesTwo: Centiles contour plots in GAMLSS

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

View source: R/CentilesTwo.R

Description

This function centilesTwo() plots two dimensional centiles contour plots for GAMLSS models.

Usage

1
2
3
4
centilesTwo(object, grid.x1, grid.x2, x1.name, x2.name, 
       cent = 0.05, dist = 0.01, points = TRUE, 
       other = list(), point.col = 1, point.pch = ".", 
       image = FALSE, image.col = heat.colors(12), ...)

Arguments

object

an gamlss object

grid.x1

grid values for x-variable one

grid.x2

grid values for x-variable two

x1.name

the name of x-variable on

x2.name

the name of x-variable two

cent

the required centiles

dist

the distance

points

whether to plot the data points

other

a list having other explanatory variables at fixed values

point.col

the colour of the data points

point.pch

the type of the data point

image

whether to plot using the image9 function

image.col

the colour scheme

...

for extra arguments for the contour() function

Details

The function uses the function exclude.too.far() of the package mgcv.

Value

Produce a contour plot.

Author(s)

Mikis Stasinopoulos d.stasinopoulos@londonmet.ac.uk, Bob Rigby, Fernanda De Bastiani

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., and De Bastiani F., (2019) Distributions for Modeling Location, Scale and Shape: Using GAMLSS in R, Chapman and Hall/CRC.

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.

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

Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.

See Also

centiles

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run:  
data(plasma)
m1 <- gamlss(betadiet ~ ga(~te(age, fiber)), sigma.formula = ~1,  
    nu.formula = ~ga(~te(age, fiber)), tau.formula = ~1,  
    family = BCTo, data = plasma)
centilesTwo(m1, 18:90, seq(2.5,38, 0.5), age, fiber, cent=0.05, dist=.1,
            xlab="age", ylab='fiber') 
centilesTwo(m1, 18:90, seq(2.5,38, 0.5), age, fiber, cent=0.95, dist=.1)

## End(Not run)

gamlss.add documentation built on Feb. 4, 2020, 9:08 a.m.