getResidPerGene            package:GSEAlm            R Documentation

_R_o_w-_b_y-_R_o_w _L_i_n_e_a_r-_M_o_d_e_l _R_e_s_i_d_u_a_l_s _f_o_r _G_e_n_e _E_x_p_r_e_s_s_i_o_n (_o_r _s_i_m_i_l_a_r)
_D_a_t_a _S_t_r_u_c_t_u_r_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     This produces residuals of an identical linear model applied to
     each row of a gene expression matrix (or similar dataset).
     Computation speed is achieved via straightforward matrix algebra.
     Most commonly-used residual types are available.

_U_s_a_g_e:

     getResidPerGene(lmobj, type = "extStudent")

_A_r_g_u_m_e_n_t_s:

   lmobj: An object produced by function 'lmPerGene'. 

    type: A string indicating the type of residual requeseted (defaults
          to externally-Studentized). 

_D_e_t_a_i_l_s:

     Types of residuals now available:

"_r_e_s_p_o_n_s_e" Response residuals, observed minus fitted

"_n_o_r_m_a_l_i_z_e_d" Response residuals divided by the estimated residual S.E.

"_i_n_t_S_t_u_d_e_n_t" Internally Studentized residuals, often referred to as
     "Standardized"

_d_e_f_a_u_l_t Externally Studentized residuals, which can be used directly
     for outlier identification

_V_a_l_u_e:

     Returns a instance of 'ExpressionSet' where the expression matrix
     contains the residuals. The 'phenoData' are inherited from
     'lmobj$eS'.

_A_u_t_h_o_r(_s):

     Robert Gentleman, Assaf Oron

_S_e_e _A_l_s_o:

     'lmPerGene', 'resplot','dfbetasPerGene','influence.measures'

_E_x_a_m_p_l_e_s:

     data(sample.ExpressionSet)
     lm1 = lmPerGene(sample.ExpressionSet,~sex)
     r1 = getResidPerGene(lm1)
     ### now a boxplot of all residuals by sample
     resplot(resmat=exprs(r1),fac=sample.ExpressionSet$sex)
     ### This plot is not very informative because of some gross outliers;
     ### try this instead
     resplot(resmat=exprs(r1),fac=sample.ExpressionSet$sex,lims=c(-5,5))

