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.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)
mu.link
, with "identity" link as the default for the mu parameter. Other links are "inverse", "log" and "own"sigma.link
, with "log" link as the default for the sigma parameter. Other links are "inverse", "identity" ans "own"length(n) > 1
, the length is
taken to be the number requiredLNO()
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.BCCG
.LOGNO
is defined as
$$f(y|\mu,\sigma)=\frac{1}{y \sqrt{2\pi}\sigma} \exp [-\frac{1}{2 \sigma^2}(log(y)-\mu)^2 ]$$
for $y>0$, $\mu=(-\infty,+\infty)$ and $\sigma>0$.
The probability density function in LNO
is defined as
$$f(y|\mu,\sigma,\nu)=\frac{1}{\sqrt{2\pi}\sigma}y^{\nu-1} \exp [-\frac{1}{2 \sigma^2}(z-\mu)^2 ]$$
where if $\nu \neq 0$ $z =(y^{\nu}-1)/\nu$ else $z=\log(y)$ and $z \sim N(0,\sigma^2)$,
for $y>0$, $\mu>0$, $\sigma>0$ and $\nu=(-\infty,+\infty)$.gamlss.family
, BCCG
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)
Run the code above in your browser using DataLab