\HeaderA{HWE.chisq}{Hardy-Weinberg Equilibrium Significance test for a biallelic locus}{HWE.chisq}
\keyword{misc}{HWE.chisq}
\begin{Description}\relax
Hardy-Weinberg Equilibrium Significance test for a biallelic locus .
\end{Description}
\begin{Usage}
\begin{verbatim}
HWE.chisq(object,
          marker,
          simulate.p.value = TRUE,
          B = 10000, 
          founderOnly=TRUE, 
          ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] a geneSet object.
\item[\code{marker}] marker name for the biallelic locus.
\item[\code{simulate.p.value}] a logical indicating whether to compute p-values by
Monte Carlo simulation.
\item[\code{B}] an integer specifying the number of replicates used in the
Monte Carlo test. Defaults to 10000.
\item[\code{founderOnly}] Indicates if only founders are used to do the test.
\item[\code{...}] Othere arguments used by the function \code{\LinkA{chisq.test}{chisq.test}}.
\end{ldescription}
\end{Arguments}
\begin{Value}
The values of the function \code{HWE.chisq} is the same as those of the function \code{\LinkA{chisq.test}{chisq.test}}. Part of the values are listed below:  

\begin{ldescription}
\item[\code{statistic}] the value the chi-squared test statistic.
\item[\code{parameter}] the degrees of freedom of the approximate chi-squared
distribution of the test statistic, 'NA' if the p-value is
computed by Monte Carlo simulation.
\item[\code{p.value}] the p-value for the test.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Gregory R. Warnes \email{gregory.r.warnes@pfizer.com} and Nitin Jain \email{nitin.jain@pfizer.com}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{HWE.exact}{HWE.exact}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
library(GeneticsBase)
data(CAMP)

HWE.chisq(CAMP, marker="m654")

\end{ExampleCode}
\end{Examples}

