lm.series               package:limma               R Documentation

_L_i_n_e_a_r _M_o_d_e_l _f_o_r _S_e_r_i_e_s _o_f _A_r_r_a_y_s

_D_e_s_c_r_i_p_t_i_o_n:

     Fit linear model for each gene given a series of arrays

_U_s_a_g_e:

     lm.series(M,design=NULL,ndups=1,spacing=1,weights=NULL)

_A_r_g_u_m_e_n_t_s:

       M: a numeric matrix containing log-ratios (M-values) for each
          spot on each array. Rows correspond to spots and columns to
          arrays.

  design: a numeric matrix containing the design matrix for linear
          model. The number of rows should agree with the number of
          columns of M. The number of columns will determine the number
          of coefficients estimated for each gene.

   ndups: number of duplicate spots. Each gene is printed ndups times
          in adjacent spots on each array.

 spacing: the spacing between the rows of 'M' corresponding to
          duplicate spots, 'spacing=1' for consecutive spots

 weights: an optional numeric matrix of the same dimension as 'M'
          containing weights for each spot. If it is of different
          dimension to 'M', it will be filled out to the same size.

_D_e_t_a_i_l_s:

     The linear model is fit for each gene by calling the function
     'lm.fit' or 'lm.wfit' from the base library.

_V_a_l_u_e:

     A list with components 

coefficients: numeric matrix containing the estimated coefficients for
          each linear model. Same number of rows as 'M', same number of
          columns as 'design'.

stdev.unscaled: numeric matrix conformal with 'coef' containing the
          unscaled standard deviations for the coefficient estimators.
          The standard errors are given by 'stdev.unscaled * sigma'.

   sigma: numeric vector containing the residual standard deviation for
          each gene.

df.residual: numeric vector giving the degrees of freedom corresponding
          to 'sigma'.

_A_u_t_h_o_r(_s):

     Gordon Smyth

_S_e_e _A_l_s_o:

     'lm.fit'.

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

_E_x_a_m_p_l_e_s:

     #  Simulate gene expression data,
     #  6 microarrays and 100 genes with one gene differentially expressed in first 3 arrays
     M <- matrix(rnorm(100*6,sd=0.3),100,6)
     M[1,1:3] <- M[1,1:3] + 2
     #  Design matrix includes two treatments, one for first 3 and one for last 3 arrays
     design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1))
     fit <- lm.series(M,design=design)
     eb <- ebayes(fit)
     #  Large values of eb$t indicate differential expression
     qqt(eb$t[,1],df=fit$df+eb$df.prior)
     abline(0,1)

