EGB2 | R Documentation |
This function defines the generalized t distribution, a four parameter distribution. The response variable is
in the range from minus infinity to plus infinity.
The functions dEGB2
,
pEGB2
, qEGB2
and rEGB2
define the density,
distribution function, quantile function and random
generation for the generalized beta type 2 distribution.
EGB2(mu.link = "identity", sigma.link = "log", nu.link = "log",
tau.link = "log")
dEGB2(x, mu = 0, sigma = 1, nu = 1, tau = 0.5, log = FALSE)
pEGB2(q, mu = 0, sigma = 1, nu = 1, tau = 0.5, lower.tail = TRUE,
log.p = FALSE)
qEGB2(p, mu = 0, sigma = 1, nu = 1, tau = 0.5, lower.tail = TRUE,
log.p = FALSE)
rEGB2(n, mu = 0, sigma = 1, nu = 1, tau = 0.5)
mu.link |
Defines the |
sigma.link |
Defines the |
nu.link |
Defines the |
tau.link |
Defines the |
x,q |
vector of quantiles |
mu |
vector of location parameter values |
sigma |
vector of scale parameter values |
nu |
vector of skewness |
tau |
vector of kurtosis |
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 |
The probability density function of the Generalized Beta type 2, (GB2
), is defined as:
f(y|\mu,\sigma\,\nu,\tau) = e^{\nu z }\left[|\sigma| B(\nu,\tau) \left(1+ e^z\right)^{\nu+\tau} \right]^{-1}
for -\infty<y<\infty
, where z=(y-\mu)/\sigma
and
-\infty<\mu<\infty
, -\infty<\sigma<\infty
,
\nu>0
and \tau>0
, McDonald and Xu (1995), see also pp. 385-386 of Rigby et al. (2019).
EGB2()
returns a gamlss.family
object which can be used to fit the EGB2 distribution in the
gamlss()
function.
dEGB2()
gives the density, pEGB2()
gives the distribution
function, qEGB2()
gives the quantile function, and rEGB2()
generates random deviates.
Bob Rigby and Mikis Stasinopoulos
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.
Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC,\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/9780429298547")}. An older version can be found in https://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, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v023.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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/b21973")}
(see also https://www.gamlss.com/).
gamlss.family
, JSU
, BCT
EGB2() #
y<- rEGB2(200, mu=5, sigma=2, nu=1, tau=4)
library(MASS)
truehist(y)
fx<-dEGB2(seq(min(y), 20, length=200), mu=5 ,sigma=2, nu=1, tau=4)
lines(seq(min(y),20,length=200),fx)
# something funny here
# library(gamlss)
# histDist(y, family=EGB2, n.cyc=60)
integrate(function(x) x*dEGB2(x=x, mu=5, sigma=2, nu=1, tau=4), -Inf, Inf)
curve(dEGB2(x, mu=5 ,sigma=2, nu=1, tau=4), -10, 10, main = "The EGB2 density
mu=5, sigma=2, nu=1, tau=4")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.