Learn R Programming

HapEstXXR (version 0.1-8)

catt: Cochrane armitage trend test (CATT) for SNP genotypes

Description

Performs chi-squared test for SNP genotypes. By default, score is chosen as the number of alleles (0, 1, 2).

Usage

catt(y, x, score = c(0, 1, 2))

Arguments

y
Vector of trait values. y must have values of 1 for event, 0 for no event.
x
Vector of SNP genotypes, 1-column coding (SNP allele dosis: 0,1,2).
score
Group score.

Value

2x3-table
Genotype distribution.
chisq
The value for the test statistic.
df
Degrees of freedom.
p.value
The p-value for the test.
n.miss
Number of individuals with missing values.

Details

The Cochran-Armitage trend test is typically used in categorical data analysis when some categories are ordered. Here it is used as a genotype-based test for candidate gene association.

References

Sasieni PD. From genotypes to genes: doubling the sample size.Biometrics. 1997 Dec;53(4):1253-61.

See Also

prop.trend.test

Examples

Run this code
y <- sample(c(0, 1), 100, replace = TRUE)
x <- sample(c(0, 1, 2), 100, replace = TRUE)
catt(y, x)

Run the code above in your browser using DataLab