Computes the probability that (at least) one (out of n) observation(s) of the latent variable U 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.
p_m1(gamma, beta, distname, n =1, use.mean.variance =TRUE)
Arguments
gamma: scalar; skewness parameter.
beta: numeric vector (deprecated); parameter β of the input distribution. See check_beta on how to specify beta for each distribution.
distname: character; name of input distribution; see get_distnames.
n: number of RVs/observations.
use.mean.variance: logical; if TRUE it uses mean and variance implied by β to do the transformation (Goerg 2011). If FALSE, it uses the alternative definition from Goerg (2016) with location and scale parameter.
Returns
non-negative float; the probability p−1 for n observations.
Details
The probability that one observation of the latent RV U lies in the non-principal region equals at most
p−1(γ,n=1)=P(U<−∣γ∣1),
where U is the zero-mean, unit variance version of the input c("XsimFX(xmidboldsymbol\n", "beta)") -- see References.
For N independent RVs U1,…,UN, the probability that at least one data point came from the non-principal region equals
For improved numerical stability the cdf of a geometric RV (pgeom) is used to evaluate the last expression. Nevertheless, numerical problems can occur for c("∣gamma∣<\n", "0.03") (returns 0 due to rounding errors).
Note that 1−(1−p−1(γ,n=1))N reduces to p−1(γ)
for N=1.
Examples
beta.01<- c(mu =0, sigma =1)# for n=1 observationp_m1(0, beta = beta.01, distname ="normal")# identical to 0# in theory != 0; but machine precision too lowp_m1(0.01, beta = beta.01, distname ="normal")p_m1(0.05, beta = beta.01, distname ="normal")# extremely smallp_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 observationsp_m1(0, n=100, beta = beta.01, distname ="normal")# == 0p_m1(0.1, n=100, beta = beta.01, distname ="normal")# still smallp_m1(0.3, n=100, beta = beta.01, distname ="normal")# a bit more likelyp_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.