Learn R Programming

genogeographer (version 0.1.19)

exponent_tilt: P-values from Importing Sampling using Exponential tilting

Description

P-values from Importing Sampling using Exponential tilting

Usage

exponent_tilt(x0, x1, n, p_limit = 0.1, B = 500, return_all = FALSE)

Arguments

x0

Allele count of profile

x1

Population allele count

n

Sampled alleles in total in population

p_limit

Upper limit to which we use the normal approximation

B

An integer specifying the number of importance samples.

return_all

Default is FALSE. If TRUE: Returns p-value, standard deviation, and method (and diagnostics).

Value

If return_all= FALSE the p-value is returned. Otherwise list of elements (see return_all) is returned.

Details

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.