gen.Inf0to1: Functions to generate inflated 0-to-1 distributions from...

Description Usage Arguments Details Value Author(s) References Examples

Description

There are six functions here. Only the function gen.Inf0to1() should be used. The remaing five functions will be automatically created once gen.Inf0to1() has been run.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gen.Inf0to1(family = "BE", type.of.Inflation = c( "Zero&One", "Zero", "One"), 
            ...)
Inf0to1.d(family = "BE", type.of.Inflation = c( "Zero&One", "Zero", "One"), 
            ...) 
Inf0to1.p(family = "BE", type.of.Inflation = c( "Zero&One", "Zero", "One"), 
            ...) 
Inf0to1.q(family = "BE", type.of.Inflation = c( "Zero&One", "Zero", "One"), 
            ...) 
Inf0to1.r(family = "BE", type.of.Inflation = c( "Zero&One", "Zero", "One"), 
            ...) 
plotInf0to1(family = "BE", type.of.Inflation = c( "Zero&One", "Zero", "One"), 
            ...) 

Arguments

family

a continuous (0,1) distribution (extremes not included) gamlss.family distribution

type.of.Inflation

the type of inflation

...

for passing extra arguments

Details

Functions Inf0to1.d, Inf0to1.p, Inf0to1.q and Inf0to1.r allow to create the density function, distribution function, quantile function and random generation, respectively. Function plotInf0to1 can be used to create the plot the distributions.

Alternatively, the function gen.Inf0to1 creates the all the standard d,p,q,r functions plus the plotting function.

For example, let us take the case of the logit SST distribution with inflation at 1. First generate the "logitSST" distribution by using gen.Family("SST", "logit"), and then, by use gen.Inf0to1("logitSST", "One"). The functins dlogitSSTInf1, plogitSSTInf1, qlogitSSTInf1, rlogitSSTInf1 and plotlogitSSTInf1 will be automatically generated. Note that gen.Inf0to1 never creates a fitting function of the type "logitSSTInf1", but the existing logitSST must be specified instead as an argument family of function gamlssInf0to1().

Value

The function gen.Inf0to1 returns the d, p, q and r functions plus the plotting function.

Author(s)

Mikis Stasinopoulos mikis.stasinopoulos@gamlss.org, Bob Rigby and Marco Enea

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.

Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).

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. https://www.crcpress.com/Flexible-Regression-and-Smoothing-Using-GAMLSS-in-R/Stasinopoulos-Rigby-Heller-Voudouris-Bastiani/p/book/9781138197909.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# 1.
gen.Inf0to1("BE","Zero&One")
rBETAInf0to1 <- Inf0to1.r("BE","Zero&One") 
all.equal(rBETAInf0to1, rBEInf0to1) 
plotBEInf0to1()
plotBEInf0to1(mu=0.3,sigma=0.35,xi0=0.5,xi1=0.3)

# 2.
gen.Family("SST", "logit")
gen.Inf0to1("logitSST","One") 
set.seed(30)

args(rlogitSSTInf1)
y <- rlogitSSTInf1(1000,mu=0.2,sigma=0.5,nu=1,tau=5,xi1=0.2)
quantile(y,c(0.1,0.25,0.5,0.75,0.9))

args(qlogitSSTInf1)
qlogitSSTInf1(p=c(0.1,0.25,0.5,0.75,0.9),mu=0.2,sigma=0.5,nu=1,tau=5,xi1=0.2)
plotlogitSSTInf1(mu=0.2,sigma=0.5,nu=1,tau=5,xi1=0.2)

gamlss.inf documentation built on May 2, 2019, 6:46 a.m.