haplo.score.w          package:GeneticsBase          R Documentation

_W_r_a_p_p_e_r _f_o_r _c_o_m_p_u_t_i_n_g _s_c_o_r_e _s_t_a_t_i_s_t_i_c_s _t_o _e_v_a_l_u_a_t_e _t_h_e _a_s_s_o_c_i_a_t_i_o_n _o_f _a _t_r_a_i_t _w_i_t_h _h_a_p_l_o_t_y_p_e_s, _w_h_e_n _l_i_n_k_a_g_e _p_h_a_s_e _i_s _u_n_k_n_o_w_n _a_n_d _d_i_p_l_o_i_d _m_a_r_k_e_r _p_h_e_n_o_t_y_p_e_s _a_r_e _o_b_s_e_r_v_e_d _a_m_o_n_g _u_n_r_e_l_a_t_e_d _s_u_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     wrapper for computing score statistics to evaluate the association
     of a trait with haplotypes, when linkage phase is unknown and
     diploid marker phenotypes are observed among unrelated subjects.
     For now, only autosomal loci are considered.

_U_s_a_g_e:

     haplo.score.w(geneSetObj, 
                   trait.type = "gaussian", 
                   offset = NA, 
                   x.adj = NA, 
                   skip.haplo = 5/(2 * nrow(geno)), 
                   locus.label = NA, 
                   miss.val = c(0, NA), 
                   simulate = FALSE, 
                   sim.control = score.sim.control(), 
                   em.control = haplo.em.control())

_A_r_g_u_m_e_n_t_s:

geneSetObj: A geneSet object

trait.type: Character string defining type of trait, with values of
          "gaussian", "binomial", "poisson", "ordinal".

  offset: Vector of offset when trait.type = "poisson" 

   x.adj: Matrix of non-genetic covariates used to adjust the score
          statistics.  Note that intercept should not be included,  as
          it will be added in this function. 

skip.haplo: Skip score statistics for haplotypes with frequencies <
          'skip.haplo'. The default is for an expected count of 5 out
          of the 2*N haplotype  occurrences.

locus.label: Vector of labels for loci. 

miss.val: vector of values that represent missing alleles in geno.

simulate: Logical:  if [F]alse, no empirical p-values are computed; if
          [T]rue, simulations are performed. Specific simulation
          parameters can be controlled in the sim.control parameter
          list. 

sim.control: List of control parameters to determine how simulations
          are performed for simulated p-values. The list is created by
          the function 'score.sim.control' and the default values of
          this function can be changed as desired. See
          'score.sim.control' for details.

em.control: A list of control parameters to determine how to perform
          the EM algorithm for estimating haplotype frequencies when
          phase is   unknown. The list is created by the function
          'haplo.em.control' - see this function for more details

_D_e_t_a_i_l_s:

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

_V_a_l_u_e:

     List with the following components:

score.global: Global statistic to test association of trait with 
          haplotypes that have frequencies >= skip.haplo. 

      df: Degrees of freedom for score.global. 

score.global.p: P-value of score.global based on chi-square
          distribution,  with degrees of freedom equal to df. 

score.global.p.sim: P-value of score.global based on simulations (set
          equal to NA when simulate=F). 

score.haplo: Vector of score statistics for individual haplotypes that
          have frequencies >= skip.haplo. 

score.haplo.p: Vector of p-values for score.haplo, based on a
          chi-square distribution with 1 df. 

score.haplo.p.sim: Vector of p-values for score.haplo, based on
          simulations (set equal to NA when simulate=F). 

score.max.p.sim: Simulated p-value indicating for simulations the
          number of times a  maximum score.haplo value exceeds the
          maximum score.haplo from the original data (equal to NA when
          simulate=F). 

haplotype: Matrix of hapoltypes  analyzed.  The ith row of haplotype
          corresponds to the ith item of score.haplo, score.haplo.p,
          and score.haplo.p.sim. 

hap.prob: Vector of haplotype probabilies, corresponding to the
          haplotypes in the matrix haplotype. 

locus.label: Vector of labels for loci, of length  K  (same  as input
          argument). 

simulate: Same as function input parameter.  If [T]rue, simulation
          results are included in the haplo.score object. 

n.val.global: Vector containing the number of valid simulations used in
          the global score statistic simulation. The number of valid
          simulations can be less than the number of simulations
          requested (by sim.control) if simulated data sets produce
          unstable variances of the score statistics.   

n.val.haplo: Vector containing the number of valid simulations used in
          the p-value simulations for maximum-score statistic and
          scores for the individual haplotypes. 

_N_o_t_e:

     ~~further notes~~

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

