selectModel              package:limma              R Documentation

_S_e_l_e_c_t _A_p_p_r_o_p_r_i_a_t_e _L_i_n_e_a_r _M_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     Select the best fitting linear model for each gene by minimizing
     an information criterion.

_U_s_a_g_e:

     selectModel(y, designlist, criterion="aic", df.prior=0, s2.prior=NULL, s2.true=NULL, ...)

_A_r_g_u_m_e_n_t_s:

       y: a matrix-like data object, containing log-ratios or
          log-values of expression for a series of microarrays. Any
          object class which can be coerced to matrix is acceptable
          including 'numeric', 'matrix', 'MAList', 'marrayNorm',
          'ExpressionSet' or 'PLMset'.

designlist: list of design matrices

criterion: information criterion to be used for model selection,
          '"aic"', '"bic"' or '"mallowscp"'.

df.prior: prior degrees of freedom for residual variances. See
          'squeezeVar'

s2.prior: prior value for residual variances, to be used if
          'df.prior'>0.

 s2.true: numeric vector of true variances, to be used if
          'criterion="mallowscp"'.

     ...: other optional arguments to be passed to 'lmFit'

_D_e_t_a_i_l_s:

     This function chooses, for each probe, the best fitting model out
     of a set of alternative models represented by a list of design
     matrices. Selection is by Akaike's Information Criterion (AIC),
     Bayesian Information Criterion (BIC) or by Mallow's Cp.

     The criteria have been generalized slightly to accommodate an
     information prior on the variances represented by 's2.prior' and
     'df.prior' or by 's2.post'. Suitable values for these parameters
     can be estimated using 'squeezeVar'.

_V_a_l_u_e:

     List with components 

      IC: matrix of information criterion scores, rows for probes and
          columns for models

    pref: factor indicating the model with best (lowest) information
          criterion score

_A_u_t_h_o_r(_s):

     Alicia Oshlack and Gordon Smyth

_S_e_e _A_l_s_o:

     An overview of linear model functions in limma is given by
     06.LinearModels.

_E_x_a_m_p_l_e_s:

     nprobes <- 100
     narrays <- 5
     y <- matrix(rnorm(nprobes*narrays),nprobes,narrays)
     A <- c(0,0,1,1,1)
     B <- c(0,1,0,1,1)
     designlist <- list(
       None=cbind(Int=c(1,1,1,1,1)),
       A=cbind(Int=1,A=A),
       B=cbind(Int=1,B=B),
       Both=cbind(Int=1,AB=A*B),
       Add=cbind(Int=1,A=A,B=B),
       Full=cbind(Int=1,A=A,B=B,AB=A*B)
     )
     out <- selectModel(y,designlist)
     table(out$pref)

