arithscanperm              package:qtl              R Documentation

_A_r_i_t_h_m_e_t_i_c _O_p_e_r_a_t_o_r_s _f_o_r _p_e_r_m_u_t_a_t_i_o_n _r_e_s_u_l_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Add or subtract LOD scores in permutation results from 'scanone'
     or 'scantwo'.

_U_s_a_g_e:

     perm1+perm2
     perm1-perm2

_A_r_g_u_m_e_n_t_s:

perm1, perm2: Permutation results from 'scanone' or 'scantwo', on the
          same set of chromosomes and markers.

_D_e_t_a_i_l_s:

     This is used to calculate the sum or difference of LOD scores of
     two sets of permutation results from 'scanone' or 'scantwo'.  One
     must be careful to ensure that the permutations are perfectly
     linked, which  will require the use of 'set.seed'.

_V_a_l_u_e:

     The same data structure as the input objects, with LOD scores
     added or subtracted.

_A_u_t_h_o_r(_s):

     Karl W Broman, kbroman@biostat.wisc.edu

_E_x_a_m_p_l_e_s:

     data(fake.bc)

     fake.bc <- calc.genoprob(fake.bc, step=2.5)

     # covariates
     ac <- pull.pheno(fake.bc, c("sex","age"))
     ic <- pull.pheno(fake.bc, "sex")

     # set seed
     theseed <- round(runif(1, 1, 10^8))
     set.seed(theseed)

     # permutations with additive but not the interactive covariate
     ## Not run: 
     operm.acovar <- scanone(fake.bc, addcovar=ac, n.perm=1000)
     ## End(Not run)

     # re-set the seed
     set.seed(theseed)

     # permutations with interactive covariate
     ## Not run: 
     operm.icovar <- scanone(fake.bc, addcovar=ac, intcovar=ic, 
                           n.perm=1000)
     ## End(Not run)

     # permutation results for the QTL x covariate interaction
     operm.gxc <- operm.icovar - operm.acovar

     # LOD thresholds
     summary(operm.gxc)

