P-values from Importing Sampling using Exponential tilting
exponent_tilt(x0, x1, n, p_limit = 0.1, B = 500, return_all = FALSE)
Allele count of profile
Population allele count
Sampled alleles in total in population
Upper limit to which we use the normal approximation
An integer specifying the number of importance samples.
Default is FALSE. If TRUE: Returns p-value, standard deviation, and method (and diagnostics).
If return_all= FALSE
the p-value is returned. Otherwise list of elements (see return_all
) is returned.
The method of importance sampling described in Tvedebrink et al (2018), Section 2.3 is implemented. It relies on exponential tilting of the proposal distribution using in the importance sampling.