resid_qqplot: QQ-plot of the residuals of a GAMLSS model

View source: R/resid_qqplot.R

resid_qqplotR Documentation

QQ-plot of the residuals of a GAMLSS model

Description

The function resid_qqplot() produces a single QQ-plot of the residuals from a fitted GAMLSS model or any other model with suitable standardised residuals.

The function add_resid_qqplot() takes a QQ-plot created by resid_qqplot() and adds another QQ-plot from a different fitted model.

The function model_resid_qqplots() takes different fitted models and creates QQ-plots for all fitted models.

Usage

resid_qqplot(obj, resid, value = 3, points.col = "steelblue4", 
              line.col = "darkgray", check_overlap = TRUE, title)
              
add_resid_qqplot(gg, obj, value = 3, points.col = "sienna",
             line.col = "darkgray", check_overlap = TRUE, title)  
             
model_qqplot(obj, ..., line.col = "steelblue4", title)

Arguments

obj

A GAMLLS fitted model or

resid

any other residual suitable standardised.

gg

a ggplot

value

A cut off value to identify large or small residuals

points.col

the colout of the points in the plot

line.col

the colout of the line in the plot

check_overlap

if observations are identify this reduvce the cluterring

title

a title if needed it

...

extra GAMLSS models

Details

This is a stanard QQ-plot but with the advadance of able to identify large or samll residuals

Value

A QQ-plotbis created

Author(s)

Mikis Stasinopoulos, Bob Rigby and Fernanda De Bastiani

References

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

plot.gamlss

Examples

data(abdom)
a<-gamlss(y~pb(x),family=LO,data=abdom)
b<-gamlss(y~pb(x),family=NO,data=abdom)
gg <- resid_qqplot(a)
add_resid_qqplot(gg, b)
model_qqplot(a,b)

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