make.design.matrix                   package:maSigPro                   Documentation

Make design matrix for regression fit of time series gene expression experiments

Description:

     'make.design.matrix' creates the design matrix of dummies for fitting time series micorarray
     gene expression experiments.

Usage:

     make.design.matrix (edesign, grade = 2, time.col = 1,  repl.col = 2,  group.cols = c(3:ncol(design))) )

Arguments:

     edesign: matrix describing experimental design. Rows must be arrays and columns experiment descriptors
     
     grade: the grade of the regression fit polynome. grade=1 return lineal regression, grade=2 returns quadratic regression... and so on
    
     time.col: column in edesign containing time values. Default is first column

     repl.col: column in edesign containing coding for replicate arrays. Default is second column

     groups.col: columns indicating the coding for each group (treatment, tissue,...) in the experiment (see details).
   
Details:

     rownames of edeign object should contain the arrays naming (ie. array1, array2, ....). 
     colnames of edesing must contain the names of experiment descriptors(ie. "Time", "Replicates", "Treatment A", "Treatment B",...)
     for each experimental group a different groups column must be present in edesign, coding with 1 and 0 whether each array belongs to that group or not.

     make.matrix returns a design matrix where rows represent arrays and column variables of time, dummies and their interactions for up to the grade given.
     Dummies show the relative effect of each experimental group related to the first one. Single dummies indicate the abcissa component of each group.
     Timexdummy variables indicate slope changes, Time^2xdummy indicate curvature changes. Higher grade values could model complex responses. 
     In case experimental groups share a initial state (ie. common time 0), no abcissa components are modeled.      

Value:

     dis: design matrix of dummies for fitting time series 

     groups.vector: vector coding the experimental group to which each variable belongs to

     edesign: experimental design input object

References:

     Conesa, A   aconesa@ivia.es
     Nueda, MJ   mj.nueda@ua.es


