Description Usage Arguments Details Value Note Author(s) References Examples
The function UGOM()
define the unit-Gompertz distribution for a gamlss.family
object to be used in GAMLSS fitting. UGOM()
has the τ-th quantile equal to the parameter mu and sigma as the shape parameter. The functions dUGOM
, pUGOM
, qUGOM
and rUGOM
define the density, distribution function, quantile function and random generation for unit-Gompertz distribution.
1 2 3 4 5 6 7 8 9 |
x, q |
vector of quantiles on the (0,1) interval. |
mu |
vector of quantile parameter values. |
sigma |
vector of shape parameter values. |
tau |
the τ-th fixed quantile in [d-p-q-r]-UGOM function. |
log, log.p |
logical; If TRUE, probabilities p are given as log(p). |
lower.tail |
logical; If TRUE, (default), P(X ≤q{x}) are returned, otherwise P(X > x). |
p |
vector of probabilities. |
n |
the number of observations. If |
mu.link |
the mu link function with default logit. |
sigma.link |
the sigma link function with default logit. |
Probability density function
f≤ft( {x\mid μ ,σ ,τ } \right)=≤ft ( \frac{\log ≤ft( τ \right) }{1-μ ^{-σ }} \right ) σ x^{-≤ft( 1+σ \right) }\exp ≤ft[ ≤ft ( \frac{\log ≤ft( τ \right) }{1-μ ^{-σ }} \right ) ≤ft( 1-x^{-σ }\right) \right]
Cumulative distribution function
F≤ft({x\mid μ ,σ ,τ } \right) = \exp ≤ft[ ≤ft ( \frac{\log ≤ft( τ \right) }{1-μ ^{-σ }} \right ) ≤ft( 1-x^{-σ }\right) \right]
Mean
E(X)=≤ft( \frac{\log ≤ft( τ \right) }{1-μ ^{-σ }}\right) ^{\frac{1}{θ }}\exp ≤ft(\frac{\log ≤ft( τ \right) }{1-μ ^{-σ }}\right)Γ ≤ft( \frac{σ -1}{σ },\frac{\log ≤ft( τ \right) }{ 1-μ ^{-σ }}\right)
where 0 < (x, μ)<1, μ is, for a fixed and known value of τ, the τ-th quantile, σ is the shape parameter and Γ(a, b) is the upper incomplete gamma function.
UGOM()
return a gamlss.family object which can be used to fit a unit-Gompertz distribution by gamlss() function.
Note that for UGOM()
, mu is the τ-th quantile and sigma a shape parameter. The gamlss
function is used for parameters estimation.
Josmar Mazucheli jmazucheli@gmail.com
Bruna Alves pg402900@uem.br
Hastie, T. J. and Tibshirani, R. J. (1990). Generalized Additive Models. Chapman and Hall, London.
Mazucheli, J., Alve, B. (2021). The Unit-Gompertz quantile regression model for bounded responses. preprint, 0(0), 1-20.
Mazucheli, J., Menezes, A. F. and Dey S. (2019). Unit-Gompertz distribution with applications. Statistica, 79(1), 25–43.
Rigby, R. A. and Stasinopoulos, D. M. (2005). Generalized additive models for location, scale and shape (with discussion). Applied. Statistics, 54(3), 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.
Stasinopoulos, D. M. and Rigby, R. A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, 23(7), 1–45.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | set.seed(123)
x <- rUGOM(n = 1000, mu = 0.50, sigma = 1.69, tau = 0.50)
R <- range(x)
S <- seq(from = R[1], to = R[2], length.out = 1000)
hist(x, prob = TRUE, main = 'unit-Gompertz')
lines(S, dUGOM(x = S, mu = 0.50, sigma = 1.69, tau = 0.50), col = 2)
plot(ecdf(x))
lines(S, pUGOM(q = S, mu = 0.50, sigma = 1.69, tau = 0.50), col = 2)
plot(quantile(x, probs = S), type = "l")
lines(qUGOM(p = S, mu = 0.50, sigma = 1.69, tau = 0.50), col = 2)
library(gamlss)
set.seed(123)
data <- data.frame(y = rUGOM(n = 100, mu = 0.5, sigma = 2.0, tau = 0.5))
tau <- 0.50
fit <- gamlss(y ~ 1, data = data, family = UGOM)
set.seed(123)
n <- 100
x <- rbinom(n, size = 1, prob = 0.5)
eta <- 0.5 + 1 * x;
mu <- 1 / (1 + exp(-eta));
sigma <- 1.5;
y <- rUGOM(n, mu, sigma, tau = 0.5)
data <- data.frame(y, x)
tau <- 0.50
fit <- gamlss(y ~ x, data = data, family = UGOM(mu.link = "logit", sigma.link = "log"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.