Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

HWChisqMat

Matrix version of HWChisq


Description

HWChisqMat executes the Chisquare test for HWE for each row in a matrix.

Usage

HWChisqMat(X, ...)

Arguments

X

A n times 3 matrix of genotypic counts (AA,AB,BB)

...

extra arguments that are passed on to HWChisq

Value

pvalvec

Vector with the p-values of each test

chisqvec

Vector with the chi-square statistics

Dvec

Vector with deviations from independence

Author(s)

Jan Graffelman jan.graffelman@upc.edu

See Also

Examples

X <- HWData(100,10)
colnames(X) <- c("MM","MN","NN")
Results <- HWChisqMat(X)
Output <- cbind(X,Results$chisqvec,Results$pvalvec)
print(Output)

HardyWeinberg

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

v1.7.2
GPL (>= 2)
Authors
Jan Graffelman [aut, cre], Christopher Chang [ctb], Xavi Puig [ctb], Jan Wigginton [ctb], Leonardo Ortoleva [ctb], William R. Engels [ctb]
Initial release
2021-04-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.