LNO: Log Normal distribution for fitting a GAMLSS

Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

Description

The function LOGNO defines a gamlss.family distribution to fits the log-Normal distribution. The function LNO is more general and can fit a Box-Cox transformation to data using the gamlss() function. In the LOGNO there are two parameters involved mu sigma, while in the LNO there are three parameters mu sigma, and the transformation parameter nu. The transformation parameter nu in LNO is a 'fixed' parameter (not estimated) and it has its default value equal to zero allowing the fitting of the log-normal distribution as in LOGNO. See the example below on how to fix nu to be a particular value. In order to estimate (or model) the parameter nu, use the gamlss.family BCCG distribution which uses a reparameterized version of the the Box-Cox transformation. The functions dLOGNO, pLOGNO, qLOGNO and rLOGNO define the density, distribution function, quantile function and random generation for the specific parameterization of the log-normal distribution. The functions dLNO, pLNO, qLNO and rLNO define the density, distribution function, quantile function and random generation for the specific parameterization of the log-normal distribution and more generally a Box-Cox transformation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
LNO(mu.link = "identity", sigma.link = "log")
LOGNO(mu.link = "identity", sigma.link = "log")
dLNO(x, mu = 1, sigma = 0.1, nu = 0, log = FALSE)
dLOGNO(x, mu = 0, sigma = 1, log = FALSE)
pLNO(q, mu = 1, sigma = 0.1, nu = 0, lower.tail = TRUE, log.p = FALSE)
pLOGNO(q, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE)
qLNO(p, mu = 1, sigma = 0.1, nu = 0, lower.tail = TRUE, log.p = FALSE)
qLOGNO(p, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE)
rLNO(n, mu = 1, sigma = 0.1, nu = 0)
rLOGNO(n, mu = 0, sigma = 1)

Arguments

mu.link

Defines the mu.link, with "identity" link as the default for the mu parameter. Other links are "inverse", "log" and "own"

sigma.link

Defines the sigma.link, with "log" link as the default for the sigma parameter. Other links are "inverse", "identity" ans "own"

x,q

vector of quantiles

mu

vector of location parameter values

sigma

vector of scale parameter values

nu

vector of shape parameter values

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required

Details

The probability density function in LOGNO is defined as

f(y|mu,sigma)=(1/(y*sqrt(2*pi)*sigma))*exp(-0.5*((log(y)-mu)/(sigma))^2)

for y>0, mu=(-Inf,+Inf) and σ>0.

The probability density function in LNO is defined as

f(y|mu,sigma,nu)=(1/(sqrt(2*pi)*sigma))*(y^(nu-1))*exp(-((z-mu)/(2sigma))^2)

where if ν!=0 z=(y^nu-1)/nu else z=\log(y) and z \sim N(0,σ^2), for y>0, μ>0, σ>0 and ν=(-Inf,+Inf).

Value

LNO() returns a gamlss.family object which can be used to fit a log-narmal distribution in the gamlss() function. dLNO() gives the density, pLNO() gives the distribution function, qLNO() gives the quantile function, and rLNO() generates random deviates.

Warning

This is a two parameter fit for mu and sigma while nu is fixed. If you wish to model nu use the gamlss family BCCG.

Note

mu is the mean of z (and also the median of y), the Box-Cox transformed variable and sigma is the standard deviation of z and approximate the coefficient of variation of y

Author(s)

Mikis Stasinopoulos, Bob Rigby and Calliope Akantziliotou

References

Box, G. E. P. and Cox, D. R. (1964) An analysis of transformations (with discussion), J. R. Statist. Soc. B., 26, 211–252

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.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, http://www.jstatsoft.org/v23/i07.

See Also

gamlss.family, BCCG

Examples

1
2
3
4
5
6
7
8
LOGNO()#  gives information about the default links for the log normal distribution 
LNO()# gives information about the default links for the Box Cox distribution 
# library(gamlss)
# data(abdom)
# h1<-gamlss(y~cs(x), family=LOGNO, data=abdom)#fits the log-Normal distribution  
# h2<-gamlss(y~cs(x), family=LNO, data=abdom)  #should be identical to the one above   
# to change to square root transformation, i.e. fix nu=0.5 
# h3<-gamlss(y~cs(x), family=LNO, data=abdom, nu.fix=TRUE, nu.start=0.5)

Example output

Loading required package: MASS

GAMLSS Family: LOGNO Log Normal 
Link function for mu   : identity 
Link function for sigma: log 

GAMLSS Family: LNO Box-Cox 
Link function for mu   : identity 
Link function for sigma: log 
Link function for nu   : 

gamlss.dist documentation built on May 2, 2019, 5:20 p.m.

Related to LNO in gamlss.dist...