adapted.cmh.test.true: Adapted CMH test if all frequencies are known.

View source: R/adapted.cmh.test.true.R

adapted.cmh.test.trueR Documentation

Adapted CMH test if all frequencies are known.

Description

This function performs the adapted CMH test (Spitzer et al. 2019), but in cases where all frequencies are known, and the only variance of data comes from genetic drift. Drift variance is the only variance included in this test.

Usage

adapted.cmh.test.true(freq, Ne, gen, repli)

Arguments

freq

Numeric matrix of frequencies, with the row being the haplotype/SNP, and column being the sequenced time points.

Ne

Numeric vector with length as number of replicates, containing information of Ne (effective population size) at each replicated population. If Ne changes over time, take as input a numeric matrix, with the column being the replicate position, row being the Ne at each sequenced time points.

gen

Numeric vector of sequenced time points.

repli

Numeric, specifying the number of replicated populations.

Value

Numeric vector, p-values from the hypothesis test

References

Spitzer, K., Pelizzola, M., Futschik, A., (2019), Modifying the Chi-square and the CMH test for population genetic inference: adapting to over-dispersion, The Annals of Applied Statistics 14(1): 202-220.

See Also

haplotest()


xthchen/haplotest documentation built on Nov. 29, 2022, 12:07 p.m.