Defines a one-adjusted normal-kernel Vasicek distribution for responses
in \((0,1]\). The parameter \(\nu\) is the probability at one.
Conditional on an observation in \((0,1)\), the distribution is
NVASIM with mean \(\mu\) and shape parameter \(\sigma\).
d1NVASIM(x, mu = 0.5, sigma = 0.5, nu = 0.1, log = FALSE)p1NVASIM(q, mu = 0.5, sigma = 0.5, nu = 0.1, lower.tail = TRUE, log.p = FALSE)
q1NVASIM(p, mu = 0.5, sigma = 0.5, nu = 0.1, lower.tail = TRUE, log.p = FALSE)
r1NVASIM(n, mu = 0.5, sigma = 0.5, nu = 0.1)
dOANVASIM(x, mu = 0.5, sigma = 0.5, nu = 0.1, log = FALSE)
pOANVASIM(q, mu = 0.5, sigma = 0.5, nu = 0.1, lower.tail = TRUE, log.p = FALSE)
qOANVASIM(p, mu = 0.5, sigma = 0.5, nu = 0.1, lower.tail = TRUE, log.p = FALSE)
rOANVASIM(n, mu = 0.5, sigma = 0.5, nu = 0.1)
OANVASIM(mu.link = "logit", sigma.link = "logit", nu.link = "logit")
OANVASIM() returns a gamlss.family object. The functions
d1NVASIM(), p1NVASIM(), q1NVASIM(), and
r1NVASIM() return probability mass or density values, cumulative
probabilities, quantiles, and random observations, respectively.
dOANVASIM(), pOANVASIM(), qOANVASIM(), and
rOANVASIM() are equivalent names following the GAMLSS family-name
convention.
Vector of values in \([0,1]\) at which the density or probability mass is evaluated. The distribution has support \((0,1]\), and the returned value is zero at \(x=0\).
Mean of the continuous Vasicek component, in \((0,1)\).
Shape parameter of the continuous Vasicek component, in \((0,1)\).
Probability at one, in \((0,1)\).
Logical; if TRUE, log probabilities or log densities are
returned.
Vector of values in \([0,1]\) at which the cumulative distribution function is evaluated.
Logical; if TRUE, probabilities are
\(P(Y\leq y)\); otherwise, they are \(P(Y>y)\).
Logical; if TRUE, probabilities are supplied or
returned on the log scale.
Vector of probabilities.
Number of observations. If length(n) > 1, its length is
taken to be the number required.
Link function for \(\mu\).
Link function for \(\sigma\).
Link function for \(\nu\).
Let \(Y_c\sim\mathrm{NVASIM}(\mu,\sigma)\) and let \(0<\nu<1\). The BEOI-type one-adjusted distribution is defined by $$P(Y=1)=\nu$$ and $$f_Y(y)=(1-\nu)f_{Y_c}(y\mid\mu,\sigma),\quad 0<y<1.$$ Consequently, $$E(Y)=\nu+(1-\nu)\mu$$ and $$\mathrm{Var}(Y)=(1-\nu)\mathrm{Var}(Y_c)+ \nu(1-\nu)(1-\mu)^2.$$ Thus, \(\mu=E(Y\mid 0<Y<1)\) is the mean of the continuous component, whereas \(\nu+(1-\nu)\mu\) is the marginal mean.
Ospina, R. and Ferrari, S. L. P. (2010). Inflated beta distributions. Statistical Papers, 51, 111--126.
Rigby, R. A. and Stasinopoulos, D. M. (2005). Generalized additive models for location, scale and shape. Applied Statistics, 54(3), 507--554.
NVASIM,
ZANVASIM,
BEOI
set.seed(123)
y <- r1NVASIM(1000, mu = 0.60, sigma = 0.30, nu = 0.20)
mean(y == 1)
mean(y)
0.20 + (1 - 0.20) * 0.60
if (FALSE) {
library(gamlss)
fit <- gamlss(
y ~ 1,
sigma.formula = ~ 1,
nu.formula = ~ 1,
family = OANVASIM(),
control = gamlss.control(trace = FALSE)
)
}
Run the code above in your browser using DataLab