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))

