resp_mu {gamlss.ggplots}R Documentation

Plotting the response against quantities of the fitted model

Description

All plots are of the response variable against fitted values of interest.

The function resp_mu() is the ‘original’ one plotting the response against the parameter mu. The function reports the Pearson's correlation coefficient and plot a lines (45% degrees) throught the graph.

The function resp_param() plots the response against any fitted parameter mu, sigma, nu or tau. The function also plots a smooth curve going throught the data and gives the Pearson's correlation coefficient.

The function resp_quantile() plots the response against any fitted quantile, with default the median (0.50). The function also plots a smooth curve going throught the data and gives the Pearson's correlation coefficient.

The function quantile_gamlss() is used by the function resp_quantile() to calculate the quantiles of the fitted distribution .

Usage

resp_mu(obj, title, line.col = "darkred", 
           point.col = "steelblue4", 
           point.shape = 20)
           
resp_param(obj, param = c("mu", "sigma", "nu", "tau"), 
           title, line.col = "darkred", point.col = "steelblue4", 
           point.shape = 20)

resp_quantile(obj, quantile = 0.5, title, newdata, 
           line.col = "darkred", point.col = "steelblue4", 
           point.shape = 20)

quantile_gamlss(obj, quantile = 0.5, newdata)

Arguments

obj

a GAMLSS fitted object

param

which parameters? mu, sigma, nu or tau, [only for resp_param()].

quantile

which quantile? default the median (0.50), [only for resp_quantile() and quantile_gamlss()].

title

a tittle if needed it, by default for the function fitted_resp it print the correlation coefficients between the two variable.

line.col

the colour of the line

point.col

the colour of the points

point.shape

the shape of the points

newdata

whether the evaluation should be in newdata or the old data points [only for functions resp_quantile() and quantile_gamlss() ]

Details

This is standard plot in regression where the fitted values are plotted against the response. In GAMLSS model is done by plotting the response against the fitted values of the mu model which is most case is a location parameter.

Value

A plot is returned

Note

Do not use this plot if mu is not a location parameter.

Author(s)

Mikis Stasinopulos, Rober 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.

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

resid_plots

Examples

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

[Package gamlss.ggplots version 2.1-12 Index]