exponent_tilt: P-values from Importing Sampling using Exponential tilting

Description Usage Arguments Details Value

View source: R/exponential_tilt.R

Description

P-values from Importing Sampling using Exponential tilting

Usage

1
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).

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.

Value

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


genogeographer documentation built on Sept. 27, 2019, 5:03 p.m.