\name{logLinearEM} \alias{logLinearEM} \title{Fit a log-linear Model to Case-Parent Triad Data} \description{ The log-linear model tests for preferential transmission of parental alleles to affected offspring. A Poisson regression estimates relative rates of transmission. The EM algorithm is used to impute missing data. } \usage{ logLinearEM(marker, n, pedInfo) } \arguments{ \item{marker}{a matrix with exactly two columns. Each column provides allele information coded as integers 1,2. Convention is to use the integer 2 to denote the rarer allele. Each row of the matrix corresponds to a genotype. The order of the marker matrix must match the order of \code{pedInfo}.} \item{n}{the total number of nuclear trios being used for analysis.} \item{pedInfo}{a object of class \code{data.frame} containing six variables. The variables are (1) \code{pedid} to indicate the ID number of the pedigree, (2) \code{id} to indicate the ID of the person genotyped, (3) \code{patid} to indicate the ID of the person's father and set to zero when unknown, (4) \code{matid} to indicate the ID of the person's mother and set to zero when unknown, (5) \code{gender} to indicate the gender of the person with a 1 for males and 2 for females, and (6) \code{disease} to indicate if the person has the phenotype of interest with a 1 for no and a 2 for yes. The format of \code{pedInfo} follows the standard pedigree format used for the majority of statistical genetics software packages like FASTLINK, Merlin, etc. } } \details{ This function fits a log-linear model to test for preferential transmission of an allele from unaffected parents to an affected offspring. The model estimates six mating type intercept terms and two regression coefficients that estimate risk for transmission to the affected offspring of either one or two alleles. Currently the fit is an additive model with no restricting assumptions about recessive or dominant penetrance. The model fit is exactly as described in Weinberg, CR et al (1998). When a case-parent triad is missing parental genotype data, this function uses an EM algorithm to impute back the probable genotype. The method used is exactly as described in Weinberg, CR (1999). } \value{ The function outputs an object of class \code{list} that has two components. The first list component is an object of class \code{glm} that returns the results of the log-linear model fit. The second list component is an object of class \code{anova} that returns the result of a 2-df likelihood ratio test for preferential transmission. } \references{ Weinberg, C. R., Wilcox, A. J., and Lie, R. T. (1998) A log-linear approach to case-parent-triad data: assessing effects of disease genes that act either directly or through maternal effects and that may be subject to parental imprinting. \emph{Am J Hum Genet}, \bold{62}, 969--978. Weinberg, C. R. (1999) Allowing for missing parents in genetic studies of case-parent triads. \emph{Am J Hum Genet}, \bold{64}, 1186--1193. } \seealso{ \code{\link{glm}}. } \examples{ ## create genetic data from case-parent triads gaw9 <- read.table("GAW9data.txt", header= TRUE) marker1 <- cbind(gaw9$marker1.1,gaw9$marker1.2) marker2 <- cbind(gaw9$marker2.1,gaw9$marker2.2) gawPed <- gaw9[,1:6] nPeds <- 200 ## fit the log-linear model logLinearEM(marker1,nPeds,gawPed) } \keyword{genetics}