fitted_leverage: Plot of the linear leverage of a GAMLSS model

fitted_leverageR Documentation

Plot of the linear leverage of a GAMLSS model

Description

This is plot of the "linear" leverage of a GAMLSS fitted model. By linear we mean the leverage (hat-values) we would have obtain in all the explanatory variables for all distribution parameters where put together and used to fit a linear model to the response. The "linear" leverage is them the hat-values obtained by fitting this simple linear model. Hopefully the "linear" leverage can indicate observations with extreme values in the x's. Note that observations with hight linear leverage may not be influential in the GAMLSS fitting especially if the x-variables are fitted using smoothers.

Usage

fitted_leverage(obj, plot = TRUE, title, quan.val = 0.99, 
          annotate = TRUE, line.col = "steelblue4", 
          point.col = "steelblue4", annot.col = "darkred")

Arguments

obj

A GAMLSS fitted model

plot

whether to plot ot not

title

for different title than the default

quan.val

which quantile value of the leverage should be taked to indicate the observation values

annotate

whether to annotate the extreme levarages

line.col

the colour of the lines

point.col

the colout of the points

annot.col

the colour used for annotation

Value

Returns a plot of the linear leverage against index.

Author(s)

Mikis Stasinopoulos, Bob Rigby and 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. 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

Examples

m1 <- gamlss(R~pb(Fl)+pb(A)+loc+H, data=rent, family=GA)
fitted_leverage(m1)

gamlss.ggplots documentation built on Sept. 3, 2023, 5:08 p.m.