% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/gcat.R
\name{gcat}
\alias{gcat}
\alias{gcat.stat}
\alias{gcatest}
\title{Genotype Conditional Association TEST}
\usage{
gcat(X, LF, trait, adjustment = NULL)

gcatest(X, LF, trait, adjustment = NULL)

gcat.stat(X, LF, trait, adjustment = NULL)
}
\arguments{
\item{X}{a matrix of SNP genotypes, i.e. an integer matrix of 0's,
1's, and 2's. Sparse matrices of class Matrix are not supported
(yet).}

\item{LF}{matrix of logistic factors outputed from function \code{lfa}}

\item{trait}{vector}

\item{adjustment}{matrix of adjustment variables}
}
\value{
vector of p-values
}
\description{
Performs the GCAT test for association between SNPs
and trait, and returns the p-values.
}
\section{Functions}{
\itemize{
\item \code{gcatest}: 

\item \code{gcat.stat}: returns the association statistics instead of the
p-value.
}}
\examples{
library(lfa)
LF = lfa(sim_geno, 3)
gcat_p = gcat(sim_geno, LF, sim_trait)
gcat_stat = gcat.stat(sim_geno, LF, sim_trait)
}
\references{
Song, M, Hao, W, Storey, JD (2015). Testing for genetic associations in arbitrarily structured populations. Nat. Genet., 47, 5:550-4.
}

