Dprime  R Documentation 
This function will either standardize by the maximum covariance conditional on the marginal genotype distribution, or by the maximum covariance conditional on the marginal allele frequencies.
Dprime(qmat, type = c("allele", "geno"), constrain = FALSE)
qmat 
The observed joint genotype distribution. 
type 
Should we condition on the marginal genotype distribution
( 
constrain 
A logical. This option is only applicable when

Note that when type = "allele"
and constrain = FALSE
,
the resulting D' is constrained to fall between K and K, where
K is the ploidy of the species. However, under HWE, this measure is
equal to haplotypic D'. Using constrain = TRUE
will result
in a measure that is constrained to lie between 1 and 1, but
it will not equal haplotypic D' under HWE.
Using type = "geno"
is its own thing and will not equal
D' generally under HWE. When type = "geno"
, then the
the constrain
parameter has no effect.
A vector of length 2. The first element is the estimated D'. The second element is the normalization used.
David Gerard
K < 6 qmat < matrix(stats::runif((K+1)^2), nrow = K+1) qmat < qmat / sum(qmat) Dprime(qmat, type = "geno") Dprime(qmat, type = "allele")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.