otest_g | R Documentation |
This is experimental. I haven't tested it out in lots of scenarios yet.
otest_g(
x,
g1,
g2,
pbad = 0.03,
drbound = 1/6,
pp = TRUE,
dr = TRUE,
alpha = 0,
xi1 = 1/3,
xi2 = 1/3
)
x |
A vector of genotype counts. |
g1 |
The genotype of parent 1. |
g2 |
The genotype of parent 2. |
pbad |
The upper bound on the number of bad genotypes |
drbound |
The maximum rate of double reduction. A default of 1/6 is provided, which is the rate under the complete equational segregation model of meiosis. |
pp |
A logical. Should we account for preferential pairing
( |
dr |
A logical. Should we account for double reduction
( |
alpha |
If |
xi1 |
If |
xi2 |
If |
Here, we test if the compatible genotypes are consistent with F1 populations and separately test that the number of incompatible genotypes isn't too large (less than 3 percent by default). This is the strategy the polymapR software uses. But we use a Bonferroni correction to combine these tests (minimum of two times the p-values), while they just multiply the p-values together. So our approach accounts for double reduction and preferential pairing, while also controlling the family-wise error rate.
A list with the following elements
statistic
The log-likelihood ratio test statistic.
df
The degrees of freedom.
p_value
The Bonferroni corrected p-value.
p_lrt
The p-value of the LRT.
p_binom
The p-value of the one-sided binomial test.
alpha
The estimated double reduction rate.
xi1
The estimated preferential pairing parameter of parent 1.
xi2
The estimated preferential pairing parameter of parent 2.
David Gerard
# Run a test where genotypes 0, 1, and 2 are possible
x <- c(10, 10, 4, 0, 5)
otest_g(x = x, g1 = 1, g2 = 0)
# polymapR's multiplication and the Bonferroni differ
df <- expand.grid(p1 = seq(0, 1, length.out = 20), p2 = seq(0, 1, length.out = 20))
df$polymapr <- NA
df$bonferroni <- NA
for (i in seq_len(nrow(df))) {
df$polymapr[[i]] <- df$p1[[i]] * df$p2[[i]]
df$bonferroni[[i]] <- 2 * min(c(df$p1[[i]], df$p2[[i]], 0.5))
}
graphics::plot(df$polymapr, df$bonferroni)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.