**0**wrote:

Hello everyone. I have a little question about how to design a matrix taking into account covariables.

**Subject** : I have got agilent microarray data from 12 samples (6 mild malaria sample noted "MM" and 6 cerebral malaria noted "CM"). Data relative to age, sexe, ethnie and leucocytes count are also proven for each sample. These later parameters (age, sex and leucocytes counts) are in categorical form using some thresholds that we have chosen to classify them.

**Objective** : I want get differentially expressed genes (DEGs) comparing "MM" and "CM" samples whils taking into account the effect of age, sexe and leucocytes count.

**What i did**

**1. Creating a data frame** (called "targets") containing all informations that i need. Columns SEXE, AGE and LEUC are factors with "0" and "1" for levels and column "PHENO" is factor with levels "MM" and "CM"

FileName PHENO SEXE AGE LEUC NP15014.txt CM 1 1 1 NP15016.txt CM 0 1 0 TA15052.txt CM 1 0 1 HPIKNP01.txt CM 1 0 0 NP15013.txt CM 1 1 1 NP15015.txt CM 0 1 0 TA16037.txt MM 1 0 1 TA16036.txt MM 1 0 1 TA16035.txt MM 0 0 1 TA16031.txt MM 0 1 1 TA16006.txt MM 1 0 0 HPIKPS01.txt MM 0 0 0

**2. Creating desing by this commands**

> design <- model.matrix(~PHENO*AGE*SEXE*LEUC, data = targets)

> Fit_design <- lmfit (my_ExpressionSet, design)

## i got this errror message

**Coefficients not estimable: SEXE1:AGE1 AGE1:LEUC1 PHENOMM:SEXE1:AGE1 PHENOMM:SEXE1:LEUC1 PHENOMM:AGE1:LEUC1 SEXE1:AGE1:LEUC1 PHENOMM:SEXE1:AGE1:LEUC1 ** ##

As you can see, the fiting results are wrong for almost of the design matrix coefficients. So topTable results is also wrong.

**My question **

Using the "targets" table above, how i can create a design matrix with model.matrix which allow me to get DEGs between "CM" and "MM" (my real goal) but taking into account age, sexe and leuc as covariables (confounders).

Any help will be really appreciable.

Dieureudieuf in advance.

Hello SamGG,I have already perform a formula with + instead of * but it gives me only effect on each factors. It is not what i'm looking for. But thanks for your reply.

0