haplo.em.w           package:GeneticsBase           R Documentation

_W_r_a_p_p_e_r _f_o_r _E_M _c_o_m_p_u_t_a_t_i_o_n _o_f _h_a_p_l_o_t_y_p_e _p_r_o_b_a_b_i_l_i_t_i_e_s, _w_i_t_h _P_r_o_g_r_e_s_s_i_v_e _I_n_s_e_r_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Wrapper for EM computation of haplotype probabilities, with
     Progressive Insertion.

_U_s_a_g_e:

     haplo.em.w(geneSetObj, 
                locus.label = NA, 
                miss.val = c(0, NA), 
                weight = NULL, 
                control = haplo.em.control())

_A_r_g_u_m_e_n_t_s:

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'.

_D_e_t_a_i_l_s:

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

_V_a_l_u_e:

     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 

_N_o_t_e:

     ~~further notes~~

_A_u_t_h_o_r(_s):

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

_R_e_f_e_r_e_n_c_e_s:

     ~put references to the literature/web site here ~

_S_e_e _A_l_s_o:

     'haplo.scan.w', 'haplo.score.slide.w', 'haplo.score.w'

_E_x_a_m_p_l_e_s:

     ##---- 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"

