msa                  package:LMGene                  R Documentation

_R_e_l_a_t_i_v_e _m_e_a_n _s_q_u_a_r_e _c_a_l_c_u_l_a_t_i_o_n _f_u_n_c_t_i_o_n

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

     Calculate the relative mean squre values

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

     msa(v)

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

       v: A vetor containing mean square values of all the factors

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

     rv : relative mean squre values for all factors.

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

     David Rocke and Geun-Cheol Lee

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.idav.ucdavis.edu/~dmrocke/>

_S_e_e _A_l_s_o:

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

     #library
     library(Biobase)
     library(LMGene)

     #data
     #data
     data(sample.eS)
     Smpd0 = sample.eS
     # model information 
     for(i in 1:length(Smpd0@phenoData@varLabels)){
       assign(paste('x', i, sep=''),as.factor(Smpd0@phenoData@pData[,i]))
     }
       
     fchar=''
     for(i in 1:length(Smpd0@phenoData@varLabels)){
       fchar=paste(fchar, paste('x', i, sep=''), ifelse(i<length(Smpd0@phenoData@varLabels), '+', ''), sep='')
     }
     fchar2 <- paste("y ~",fchar)
     #
     # run regression and anovas
     y <- t(as.matrix(Smpd0@exprs))
     formobj <- as.formula(fchar2)
     tmp <- lm(formobj)
     tmp2 <- mlm2lm(tmp,i)
     tmp3 <- anova(tmp2)$Mean
     tmp4 <- msa(tmp3)
     rbind(tmp3, tmp4)

