prof_term: Plotting the profile deviance of one fitted term

prof_termR Documentation

Plotting the profile deviance of one fitted term

Description

Plotting the profile deviance of a fitted term in GAMLSS

Usage

prof_term(model = NULL, criterion = c("GD", "GAIC"), 
      penalty = 2.5,  from = NULL, to = NULL, 
      step = NULL, length = 7, xlabel = NULL, plot = TRUE, 
      perc = 95, start.prev = TRUE, line.col = "darkgreen", 
      dash.line.type = 3, dash.line.size = 0.8, text.size = 5, title)

Arguments

model

a GAMLSS fitted model

criterion

whether Global deviance or GAIC

penalty

the penalty k for GAIC

from

start from

to

finish at

step

using step

length

if the step is left NULL then length is considered for evaluating the grid for the parameter. It has a default value of 11.

xlabel

if a x label is required

plot

whether tto plot the function

perc

what percentage confidence interval is required

start.prev

whether to start from the previous fitted model parameters values or not (default is TRUE)

line.col

the colour of the plotting line

dash.line.type

the type of verical dash line for CI's

dash.line.size

The size of the dash lines

text.size

the size of text

title

the title

Details

This function is the ggplot2 version of the original prof.term() function.

Value

creates a plot

Author(s)

Mikis Stasinopoulos

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

prof.term

Examples

data(aids)
# fitting a linear model
gamlss(y~x+qrt,family=NBI,data=aids)
# testing the linear beta parameter
mod<-quote(gamlss(y ~ offset(this * x) + qrt, data = aids, family = NBI))
prof_term(mod, from = .06, to=0.13)

gamlss.ggplots documentation built on May 29, 2024, 1:34 a.m.