AffyInteraction         package:AffyExpress         R Documentation

_A_n_a_l_y_z_e _i_n_t_e_r_a_c_t_i_o_n _e_f_f_e_c_t _a_n_d _p_r_o_d_u_c_e _o_u_t_p_u_t

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

     This wrapper function will create a design matrix and contrast
     matrix for  the interaction test.  Then it will fit linear model
     to test for  interaction effect for each gene and identify genes
     for which interaction  test is being significant.  For genes
     having the interaction effect, it fits linear  model for each
     genes in each level of strata.var. For genes don't have 
     interaction effect, it fits linear model for each genes without
     stratifying  the strata.var.  In the end, it will output
     signficant result.

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

     AffyInteraction(object, method, main.var, strata.var, compare1, compare2, 
       covariates=NULL, p.int=0.05, m.int=0, adj.int="none", p.value=0.05, 
       m.value=0, adj="none", filename1="result", filename2="inter_result")

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

  object: an "ExpressionSet"

  method: Three methods are supported by this function: "L" for using
          LIMMA method - compute moderated t-statistics and log-odds 
          of differential expression by empirical Bayes shrinkage of
          the standard  errors towards a common value;  "F" for using
          ordinary linear regression;  "P" for permuation test by
          resampling the phenotype

main.var: the variable of your main interest

strata.var: a categorical variable serves as a potential effect 
          modifier.  An effect modifier is a variable that modifies the
          association between outcome variable and the main variable.
          If the interaction exits,  the association between the
          outcome and main.var will be analyzed  separately within each
          stratum of strata.var

compare1: first value of the variable of main interest.  Suppose the 
          main variable is "estrogen", and its has two values:
          "present" and "absent".   You would like to compare "present"
          versus "absent".  Then you will use  compare1 = "present"

compare2: second value of the variable of main interest.  Follow from 
          the same example above, you will set compare2 = "absent"

covariates: a list of covariates, not including main.var and
          strata.var,  the default value is NULL

   p.int: p value for the interaction test

   m.int: fold change cut-off value for the interaction test

 adj.int: adjustment method for multiple comparison for testing 
          interaction, including "holm", "hochberg", "hommel",
          "bonferroni", "BH",  "BY", "fdr", "none".  Type
          help(p.adjust) for more detail.

 p.value: p value for main effect test

 m.value: fold change cut-off value for main effect test

     adj: adjustment method for multiple comparison for testing main
          effect

filename1: name of the output file for the main effect

filename2: name of the output file for the interaction test

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

     a list of data frame: The first data frame contains results for
     genes with interaction effect. The second data frame contains
     results for genes don't have interaction effect. The rest of the
     data frames contain information for main effects for each stratum
     of strata.var.

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

     Xiwei Wu xwu@coh.org, Xuejun Arthur Li xueli@coh.org

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

             
     ## Suppose that you would like to test the interaction effect between "gender" 
     ## and "group" variables, "gender" is the main effect variable.  For genes in 
     ## which the interaction test are being significant, you would like to compare 
     ## "M" vs. "F" within each level of "group".  For genes in which the interaction 
     ## test are not being significant, you would like to compare "M" vs. "F" without 
     ## stratifying "group".

     data(testData)
     normaldata<-pre.process("rma",testData)
     result<-AffyInteraction(normaldata, "L", "gender", "group","M", "F", p.int=0.05, 
       m.int=0, adj.int="none", p.value=0.05, m.value=0, adj="none", 
       filename1="result1", filename2="result2")

