p_m1 {LambertW} | R Documentation |
Non-principal branch probability
Description
Computes the probability that (at least) one (out of n)
observation(s) of the latent variable lies in the non-principal
branch region. The '
m1
' in p_m1
stands for 'minus 1', i.e,
the non-principal branch.
See Goerg (2011) and Details for mathematical derivations.
Usage
p_m1(gamma, beta, distname, n = 1, use.mean.variance = TRUE)
Arguments
gamma |
scalar; skewness parameter. |
beta |
numeric vector (deprecated); parameter |
distname |
character; name of input distribution; see
|
n |
number of RVs/observations. |
use.mean.variance |
logical; if |
Details
The probability that one observation of the latent RV U lies in the non-principal region equals at most
where is the zero-mean,
unit variance version of the input
– see References.
For independent RVs
, the probability that at
least one data point came from the non-principal region equals
This equals (assuming independence)
For improved numerical stability the cdf of a geometric RV
(pgeom
) is used to evaluate the last
expression. Nevertheless, numerical problems can occur for (returns
0
due to rounding errors).
Note that reduces to
for
.
Value
non-negative float; the probability for
n
observations.
Examples
beta.01 <- c(mu = 0, sigma = 1)
# for n=1 observation
p_m1(0, beta = beta.01, distname = "normal") # identical to 0
# in theory != 0; but machine precision too low
p_m1(0.01, beta = beta.01, distname = "normal")
p_m1(0.05, beta = beta.01, distname = "normal") # extremely small
p_m1(0.1, beta = beta.01, distname = "normal") # != 0, but very small
# 1 out of 4 samples is a non-principal input;
p_m1(1.5, beta = beta.01, distname = "normal")
# however, gamma=1.5 is not common in practice
# for n=100 observations
p_m1(0, n=100, beta = beta.01, distname = "normal") # == 0
p_m1(0.1, n=100, beta = beta.01, distname = "normal") # still small
p_m1(0.3, n=100, beta = beta.01, distname = "normal") # a bit more likely
p_m1(1.5, n=100, beta = beta.01, distname = "normal")
# Here we can be almost 100% sure (rounding errors) that at least one
# y_i was caused by an input in the non-principal branch.