View source: R/dpqr-1NvasicekM.R
| OANVASIM | R Documentation |
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")
x |
Vector of values in |
mu |
Mean of the continuous Vasicek component, in |
sigma |
Shape parameter of the continuous Vasicek component, in
|
nu |
Probability at one, in |
log |
Logical; if |
q |
Vector of values in |
lower.tail |
Logical; if |
log.p |
Logical; if |
p |
Vector of probabilities. |
n |
Number of observations. If |
mu.link |
Link function for |
sigma.link |
Link function for |
nu.link |
Link function for |
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.
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.
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
## Not run:
library(gamlss)
fit <- gamlss(
y ~ 1,
sigma.formula = ~ 1,
nu.formula = ~ 1,
family = OANVASIM(),
control = gamlss.control(trace = FALSE)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.