gamlss.family object to be used for a
GAMLSS fitting using the function gamlss(). The functions dSHASH,
pSHASH, qSHASH and rSHASH define the density,
distribution function, quantile function and random
generation for the Sinh-Arcsinh (SHASH) distribution.SHASH(mu.link = "identity", sigma.link = "log", nu.link = "log",
tau.link = "log")
dSHASH(y, mu = 0, sigma = 1, nu = 0.5, tau = 0.5, log = FALSE)
pSHASH(q, mu = 0, sigma = 1, nu = 0.5, tau = 0.5, lower.tail = TRUE,
log.p = FALSE)
qSHASH(p, mu = 0, sigma = 1, nu = 0.5, tau = 0.5, lower.tail = TRUE,
log.p = FALSE)
rSHASH(n, mu = 0, sigma = 1, nu = 0.5, tau = 0.5)mu.link, with "identity" link as the default for the mu parameter.sigma.link, with "log" link as the default for the sigma parameter.nu.link, with "log" link as the default for the nu parameter.tau.link, with "log" link as the default for the tau parameter.nu parameter valuestau parameter valueslength(n) > 1, the length is
taken to be the number requiredSHASH() returns a gamlss.family object which can be used to fit the SHASH distribution in the gamlss() function.
dSHASH() gives the density, pSHASH() gives the distribution
function, qSHASH() gives the quantile function, and rSHASH()
generates random deviates.SHASH), Jones(2005), is defined as
$$f(y|\mu,\sigma\,\nu,\tau)= \frac{c}{\sqrt{2 \pi} \sigma (1+z^2)^{1/2}} e^{-r^2/2}$$
where
$$r=\frac{1}{2} \left { \exp\left[ \tau \sinh^{-1}(z) \right] -\exp\left[ -\nu \sinh^{-1}(z) \right] \right}$$
and
$$c=\frac{1}{2} \left { \tau \exp\left[ \tau \sinh^{-1}(z) \right] + \nu \exp\left[ -\nu \sinh^{-1}(z) \right] \right}$$
and $z=(y-\mu)/\sigma$
for $-\infty < y < \infty$,
$\mu=(-\infty,+\infty)$,
$\sigma>0$,
$\nu>0$ and
$\tau>0$.
The parameters $\mu$ and $\sigma$ are the location and scale of the distribution.
The parameter $\nu$ determines the left hand tail of the distribution with $\nu>1$ indicating a lighter tail than the normal
and
$\nugamlss, gamlss.family, JSU, BCTSHASH() #
plot(function(x)dSHASH(x, mu=0,sigma=1, nu=1, tau=2), -5, 5,
main = "The SHASH density mu=0,sigma=1,nu=1, tau=2")
plot(function(x) pSHASH(x, mu=0,sigma=1,nu=1, tau=2), -5, 5,
main = "The BCPE cdf mu=0, sigma=1, nu=1, tau=2")
dat<-rSHASH(100,mu=10,sigma=1,nu=1,tau=1.5)
gamlss(dat~1,family=SHASH, control=gamlss.control(n.cyc=30))Run the code above in your browser using DataLab