model_pca {gamlss.ggplots} | R Documentation |
Plotting residuals using PCA
Description
The function model_pca()
plots several GAMLSS residuals using Principal Component Analysis.
Usage
model_pca(obj, ..., scale = TRUE, arrow_size = 1.5)
Arguments
obj |
A gamlss object |
... |
for extra GAMLSS models |
scale |
whether to scale the residuals |
arrow_size |
the arrow sizw in the biplot |
Details
The function model_pca()
plot a biplot()
plot of the residuals from different models. It uses Principal Component Analysis in the residuals of different models and plots the resuls.
Value
A biplot of the first two components is plotted.
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.
Stasinopoulos, M.D., Kneib, T., Klein, N., Mayr, A. and Heller, G.Z., (2024). Generalized Additive Models for Location, Scale and Shape: A Distributional Regression Approach, with Applications (Vol. 56). Cambridge University Press.
(see also https://www.gamlss.com/).
See Also
Examples
m1 <- gamlss(y~x, data=abdom)
m2 <- gamlss(y~pb(x), data=abdom)
m3 <- gamlss(y~pb(x), sigma.fo=~pb(x), data=abdom)
model_pca(m1,m2,m3)