gamlss.dist (version 5.1-6)

count_1_31: A set of functions to plot gamlss.family distributions

Description

Those functions are used in the distribution book of gamlss, see Rigby et. al 2019.

Usage

binom_1_31(family = BI, mu = c(0.1, 0.5, 0.7), bd = NULL, miny = 0,
           maxy = 20, cex.axis = 1.2, cex.all = 1.5)
           
binom_2_33(family = BB, mu = c(0.1, 0.5, 0.8), sigma = c(0.5, 1, 2), 
           bd = NULL, miny = 0, maxy = 10, cex.axis = 1.5, 
           cex.all = 1.5)  
           
binom_3_33(family = ZIBB, mu = c(0.1, 0.5, 0.8), sigma = c(0.5, 1, 2),
           nu = c(0.01, 0.3), bd = NULL, miny = 0, maxy = 10, 
           cex.axis = 1.5, cex.all = 1.5, cols = c("darkgray", "black"), 
           spacing = 0.3, legend.cex=1, legend.x="topright",
          legend.where=c("left","right", "center"))

contR_2_12(family = "NO", mu = c(0, -1, 1), sigma = c(1, 0.5, 2), cols=c(gray(.1),gray(.2),gray(.3)), ltype = c(1, 2, 3), maxy = 7, no.points = 201, y.axis.lim = 1.1, cex.axis = 1.5, cex.all = 1.5, legend.cex=1, legend.x="topleft" ) contR_3_11(family = "PE", mu = 0, sigma = 1, nu = c(1, 2, 3), cols=c(gray(.1),gray(.2),gray(.3)), maxy = 7, no.points = 201, ltype = c(1, 2, 3), y.axis.lim = 1.1, cex.axis = 1.5, cex.all = 1.5, legend.cex=1, legend.x="topleft")

contR_4_13(family = "SEP3", mu = 0, sigma = 1, nu = c(0.5, 1, 2), tau = c(1, 2, 5), cols=c(gray(.1),gray(.2),gray(.3)), maxy = 7, no.points = 201, ltype = c(1, 2, 3), y.axis.lim = 1.1, cex.axis = 1.5, cex.all = 1.5, legend.cex=1, legend.x="topleft", legend.where=c("left","right")) contRplus_2_11(family = GA, mu = 1, sigma = c(0.1, 0.6, 1), cols=c(gray(.1),gray(.2),gray(.3)), maxy = 4, no.points = 201, y.axis.lim = 1.1, ltype = c(1, 2, 3), cex.axis = 1.5, cex.all = 1.5, legend.cex=1, legend.x="topright")

contRplus_3_13(family = "BCCG", mu = 1, sigma = c(0.15, 0.2, 0.5), nu = c(-2, 0, 4), cols=c(gray(.1),gray(.2),gray(.3)), maxy = 4, ltype = c(1, 2, 3), no.points = 201, y.axis.lim = 1.1, cex.axis = 1.5, cex.all = 1.5, legend.cex=1, legend.x="topright", legend.where=c("left","right")) contRplus_4_33(family = BCT, mu = 1, sigma = c(0.15, 0.2, 0.5), nu = c(-4, 0, 2), tau = c(100, 5, 1), cols=c(gray(.1),gray(.2),gray(.3)), maxy = 4, ltype = c(1, 2, 3), no.points = 201, y.axis.lim = 1.1, cex.axis = 1.5, cex.all = 1.5, legend.cex=1, legend.x="topright", legend.where=c("left","right"))

contR01_2_13(family = "BE", mu = c(0.2, 0.5, 0.8), sigma = c(0.2, 0.5, 0.8), cols=c(gray(.1),gray(.2),gray(.3)), ltype = c(1, 2, 3), maxy = 7, no.points = 201, y.axis.lim = 1.1, maxYlim = 10, cex.axis = 1.5, cex.all = 1.5, legend.cex=1, legend.x="topright", legend.where=c("left","right", "center"))

contR01_4_33(family = GB1, mu = c(0.5), sigma = c(0.2, 0.5, 0.7), nu = c(1, 2, 5), tau = c(0.5, 1, 2), cols=c(gray(.1),gray(.2),gray(.3)), maxy = 0.999, ltype = c(1, 2, 3), no.points = 201, y.axis.lim = 1.1, maxYlim = 10,cex.axis = 1.5, cex.all = 1.5, legend.cex=1, legend.x="topright", legend.where=c("left","right", "center"))

count_1_31(family = PO, mu = c(1, 2, 5), miny = 0, maxy = 10, cex.axis = 1.2, cex.all = 1.5) count_1_22(family = PO, mu = c(1, 2, 5, 10), miny = 0, maxy = 20, cex.axis = 1.2, cex.all = 1.5) count_2_32(family = NBI, mu = c(0.5, 1, 5), sigma = c(0.1, 2), miny = 0, maxy = 10, cex.axis = 1.5, cex.all = 1.5)

count_2_32R(family = NBI, mu = c(1, 2), sigma = c(0.1, 1, 2), miny = 0, maxy = 10, cex.axis = 1.5, cex.all = 1.5) count_2_33(family = NBI, mu = c(0.1, 1, 2), sigma = c(0.5, 1, 2), miny = 0, maxy = 10, cex.axis = 1.5, cex.all = 1.5) count_3_32(family = SICHEL, mu = c(1, 5, 10), sigma = c(0.5, 1), nu = c(-0.5, 0.5), miny = 0, maxy = 10, cex.axis = 1.5, cex.all = 1.5, cols = c("darkgray", "black"), spacing = 0.2, legend.cex=1, legend.x="topright", legend.where=c("left","right")) count_3_33(family = SICHEL, mu = c(1, 5, 10), sigma = c(0.5, 1, 2), nu = c(-0.5, 0.5, 1), miny = 0, maxy = 10, cex.axis = 1.5, cex.all = 1.5, cols = c("darkgray", "black"), spacing = 0.3, legend.cex=1, legend.x="topright", legend.where=c("left","right", "center"))

Arguments

family

a gamlss family distribution

mu

the mu parameter values

sigma

The sigma parameter values

nu

the nu parameter values

tau

the tau parameter values

bd

the binomial denominator

miny

minimal value for the y axis

maxy

maximal value for the y axis

cex.axis

the size of the letters in the two axes

cex.all

the overall size of all plotting characters

cols

colours

spacing

spacing between plots

ltype

The type of lines used

no.points

the number of points in the curve

y.axis.lim

the maximum value for the y axis

maxYlim

the maximum permissible value for Y

legend.cex

the size of the legend

legend.x

where in the figure to put the legend

legend.where

where in the whole plot to put the legend

Value

The result is a plot

Details

Th function plot different types of continuous and discrete distributions: i) contR: continuous distribution defined on minus infinity to plus infinity, ii) contRplus: continuous distribution defined from zero to plus infinity, iii) contR01: continuous distribution defined from zero to 1, iv) bimom binomial type discrete distributions, v) count count type discrete distributions.

The first number after the first underline in the name of the function indicates the number of parameters in the distribution. The two numbers after the second underline indicate how may rows and columns are in the plot.

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. and De Bastiani F., (2019) Distributions for modelling location scale and shape: Using GAMLSS in R, Chapman and Hall/CRC (in press).

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, http://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

gamlss.family

Examples

Run this code
# NOT RUN {
count_1_31()
# }

Run the code above in your browser using DataCamp Workspace