[R] A question regarding random effects in 'aov' function

Weidong Gu anopheles123 at gmail.com
Wed Sep 21 03:04:33 CEST 2011


If different labs tested different tissue.types, I am not sure you can
effectively partition variance between labs(batches) and tissue.types.

Weidong Gu

On Tue, Sep 20, 2011 at 2:14 PM, karena <dr.jzhou at gmail.com> wrote:
> Hi,
>
> I am doing an analysis to see if these is tissue specific effects on the
> gene expression data .
>
> Our data were collected from 6 different labs (batch effects). lab 1 has
> tissue type 1 and tissue type 2, lab 2 has tissue 3, 4,5,6. The other labs
> has one tissue type each. The 'sample' data is as below:
>
> ------------------------------------------------------------------------------------------------
> Sample.ID     Gene      tissue.type          batch(lab)
> expression.level
> id1                gene1       liver                   batch1
> 0.67
> id1                gene2       liver                   batch1
> 0.89
> id2                gene1       kidney               batch1
> 0.52
> id2                gene2       kidney               batch1
> 0.45
> .
> .
> id10               gene1       brain                 batch4
> 0.56
> id10               gene2       brain                 batch4
> 0.97
> .
> .
> id100              gene1       skin                  batch10
> 0.98
> id100              gene2       skin                  batch 10
> 0.87
> -----------------------------------------------------------------------------------------------------
>
> I am going to use 'aov' to compare the tissue-specific average of gene
> expression. 'tissue.type' is the fixed effects, 'batch' and 'Sample.ID' are
> the random effects (to control for inter-individual variation and batch
> effects). How should I  write my 'aov' function? I am not sure about the
> 'random effects' part
>
> i.e.
> fm <- aov(expression.level~tissue.type+Error(Sample.ID)+Error(batch),
> data=sample)
> ??
>
> Thank you,
>
> karena
>
> --
> View this message in context: http://r.789695.n4.nabble.com/A-question-regarding-random-effects-in-aov-function-tp3827719p3827719.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list