BCCG
defines the Box-Cox Cole and Green distribution (Box-Cox normal), a three parameter distribution,
for a gamlss.family
object to be used in GAMLSS fitting using the function gamlss()
.
The functions dBCCG
, pBCCG
, qBCCG
and rBCCG
define the density, distribution function, quantile function and random
generation for the specific parameterization of the Box-Cox Cole and Green distribution.
[The function BCCGuntr()
is the original version of the function suitable only for the untruncated Box-Cox Cole and Green distribution
See Cole and Green (1992) and Rigby and Stasinopoulos (2003a,2003b) for details.BCCG(mu.link = "identity", sigma.link = "log", nu.link = "identity")
BCCGuntr(mu.link = "identity", sigma.link = "log", nu.link = "identity")
dBCCG(x, mu = 1, sigma = 0.1, nu = 1, log = FALSE)
pBCCG(q, mu = 1, sigma = 0.1, nu = 1, lower.tail = TRUE, log.p = FALSE)
qBCCG(p, mu = 1, sigma = 0.1, nu = 1, lower.tail = TRUE, log.p = FALSE)
rBCCG(n, mu = 1, sigma = 0.1, nu = 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" and "own"nu.link
, with "identity" link as the default for the nu parameter, other links are "inverse", "log" and "own"length(n) > 1
, the length is
taken to be the number requiredBCCG()
returns a gamlss.family
object which can be used to fit a Cole and Green distribution in the gamlss()
function.
dBCCG()
gives the density, pBCCG()
gives the distribution
function, qBCCG()
gives the quantile function, and rBCCG()
generates random deviates.BCCGuntr
distribution may be unsuitable for some combinations of the parameters
(mainly for large $\sigma$)
where the integrating constant is less than 0.99. A warning will be given if this is the case.
The BCCG distribution is suitable for all combinations of the distributional parameters within
their range [i.e. $\mu>0$, $\sigma>0$, $\nu=(-\infty, +\infty)$]BCCGuntr
, is defined as
$$f(y|\mu,\sigma,\nu)=\frac{1}{\sqrt{2\pi}\sigma}\frac{y^{\nu-1}}{\mu^\nu} \exp(-\frac{z^2}{2})$$
where if $\nu \neq 0$ then $z=[(y/\mu)^{\nu}-1]/(\nu \sigma)$ else
$z=\log(y/\mu)/\sigma$,
for $y>0$, $\mu>0$, $\sigma>0$ and $\nu=(-\infty,+\infty)$.
The Box-Cox Cole anf Green distribution, BCCG
, adjusts the above density $f(y|\mu,\sigma,\nu)$ for the
truncation resulting from the condition $y>0$. See Rigby and Stasinopoulos (2003a,2003b) for details.gamlss.family
, BCPE
, BCT
BCCG() # gives information about the default links for the Cole and Green distribution
# library(gamlss)
#data(abdom)
#h<-gamlss(y~cs(x,df=3), sigma.formula=~cs(x,1), family=BCCG, data=abdom)
#plot(h)
plot(function(x) dBCCG(x, mu=5,sigma=.5,nu=-1), 0.0, 20,
main = "The BCCG density mu=5,sigma=.5,nu=-1")
plot(function(x) pBCCG(x, mu=5,sigma=.5,nu=-1), 0.0, 20,
main = "The BCCG cdf mu=5, sigma=.5, nu=-1")
Run the code above in your browser using DataLab