\name{haplo.em.w} \alias{haplo.em.w} %- Also NEED an '\alias' for EACH other topic documented here. \title{Wrapper for EM computation of haplotype probabilities, with Progressive Insertion} \description{ Wrapper for EM computation of haplotype probabilities, with Progressive Insertion. } \usage{ haplo.em.w(geneSetObj, locus.label = NA, miss.val = c(0, NA), weight = NULL, control = haplo.em.control()) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{geneSetObj}{a geneSet object.} \item{locus.label}{ vector of labels for loci.} \item{miss.val}{ vector of values that represent missing alleles in geno.} \item{weight}{ weights for observations.} \item{control}{ list of control parameters. The default is constructed by the function \code{\link[haplo.stats]{haplo.em.control}}.} } \details{ Please refer to \code{\link[haplo.stats]{haplo.em}} for more details. } \value{ list with components: \item{converge}{ indicator of convergence of the EM algorithm (1 = converge, 0 = failed). } \item{lnlike}{ value of lnlike at last EM iteration (maximum lnlike if converged). } \item{lr}{ likelihood ratio statistic to test the final lnlike against the lnlike that assumes complete linkage equilibrium among all loci (i.e., haplotype frequencies are products of allele frequencies). } \item{df.lr}{ degrees of freedom for likelihood ratio statistic. The df for the unconstrained final model is the number of non-zero haplotype frequencies minus 1, and the df for the null model of complete linkage equilibrium is the sum, over all loci, of (number of alleles - 1). The df for the lr statistic is df[unconstrained] - df[null]. This can result in negative df, if many haplotypes are estimated to have zero frequency, or if a large amount of trimming occurs, when using large values of min.posterior in the list of control parameters. } \item{hap.prob}{ vector of mle's of haplotype probabilities. The ith element of hap.prob corresponds to the ith row of haplotype. } \item{locus.label}{ vector of labels for loci, of length K (see definition of input values). } \item{subj.id}{ vector of id's for subjects used in the analysis, based on row number of input geno matrix. If subjects are removed, then their id will be missing from subj.id. } \item{rows.rem}{ now defunct, but set equal to a vector of length 0, to be compatible with other functions that check for rows.rem. } \item{indx.subj}{ vector for row index of subjects after expanding to all possible pairs of haplotypes for each person. If indx.subj=i, then i is the ith row of geno. If the ith subject has n possible pairs of haplotypes that correspond to their marker genotype, then i is repeated n times. } \item{nreps}{ vector for the count of haplotype pairs that map to each subject's marker genotypes. } \item{max.pairs}{ vector of maximum number of pairs of haplotypes per subject that are consistent with their marker data in the matrix geno. The length of max.pairs = nrow(geno). This vector is computed by geno.count.pairs. } \item{hap1code}{ vector of codes for each subject's first haplotype. The values in hap1code are the row numbers of the unique haplotypes in the returned matrix haplotype. } \item{hap2code}{ similar to hap1code, but for each subject's second haplotype. } \item{post}{ vector of posterior probabilities of pairs of haplotypes for a person, given their marker phenotypes. } \item{haplotype}{ matrix of unique haplotypes. Each row represents a unique haplotype, and the number of columns is the number of loci. } \item{control}{ list of control parameters for algorithm. See haplo.em.control } } \references{ ~put references to the literature/web site here ~ } \author{ Weiliang Qiu \email{stwxq@channing.harvard.edu}, Ross Lazarus \email{ross.lazarus@channing.harvard.edu}} \note{ ~~further notes~~ } \seealso{ \code{\link{haplo.scan.w}}, \code{\link{haplo.score.slide.w}}, \code{\link{haplo.score.w}}} \examples{ ##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as "haplo.em.w" } \keyword{ misc }% at least one, from doc/KEYWORDS