Learn R Programming

segtest (version 2.0.0)

chisq_g: Chi Square test when genotypes are known

Description

This chi-squared test is run under the assumption of no double reduction and no preferential pairing.

Usage

chisq_g(x, g1, g2)

chisq_g4(x, g1, g2)

Value

A list containing the chi-squared statistic, degrees of freedom, and p-value.

Arguments

x

Vector of observed genotype counts

g1

Parent 1's genotype

g2

Parent 2's genotype

Functions

  • chisq_g4(): Alias for chisq_g, for backwards compatibility.

Author

Mira Thakkar and David Gerard

Examples

Run this code
x <- c(1, 2, 4, 3, 0)
g1 <- 2
g2 <- 2
chisq_g(x, g1, g2)

x <- c(10, 25, 10, 0, 0)
g1 <- 1
g2 <- 1
chisq_g(x, g1, g2)

Run the code above in your browser using DataLab