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)

