haplo.em.w {GeneticsBase} | R Documentation

## 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())

### Arguments

`geneSetObj` | a geneSet object.
`locus.label` | vector of labels for loci.
`miss.val` | vector of values that represent missing alleles in geno.
`weight` | weights for observations.
`control` | list of control parameters. The default is constructed by the function `haplo.em.control`.

### Details

Please refer to `haplo.em` for more details.

### Value

list with components:

`converge` | indicator of convergence of the EM algorithm (1 = converge, 0 = failed).
`lnlike` | value of lnlike at last EM iteration (maximum lnlike if converged).
`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).
`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.
`hap.prob` | vector of mle's of haplotype probabilities. The ith element of hap.prob corresponds to the ith row of haplotype.
`locus.label` | vector of labels for loci, of length K (see definition of input values).
`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.
`rows.rem` | now defunct, but set equal to a vector of length 0, to be compatible with other functions that check for rows.rem.
`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.
`nreps` | vector for the count of haplotype pairs that map to each subject's marker genotypes.
`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.
`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.
`hap2code` | similar to hap1code, but for each subject's second haplotype.
`post` | vector of posterior probabilities of pairs of haplotypes for a person, given their marker phenotypes.
`haplotype` | matrix of unique haplotypes. Each row represents a unique haplotype, and the number of columns is the number of loci.
`control` | list of control parameters for algorithm. See haplo.em.control

### Note

~~further notes~~

### Author(s)

Weiliang Qiu stwxq@channing.harvard.edu, Ross Lazarus ross.lazarus@channing.harvard.edu

### References

~put references to the literature/web site here ~

### See Also

`haplo.scan.w`, `haplo.score.slide.w`, `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"

[Package GeneticsBase version 1.8.0 Index]