I have an experiment with 3 biological factors (dev
, dev_stage; reg
, brain_region; gen
, gen_type) plus a batch factor (bat
, batch). Unfortunately I have only rather superficial understanding of ANOVA or other statistics, so I'm not sure what is the right formula for my data (I'd consider all 3 biological factors plus their higher interactions with batch effect as an additive factor.). So I hope some luck with the right ANOVA formula here :)
As you can see below,
dev
could not be separated frombat
;- At
dev
P28,gen
andbat
are unbalanced.
So based on many discussions among others seen on the web (mainly here), I guess that bat should be treated as a random effect, and the formula is
aov( x ~ dev * reg * gen, random = ~1|bat)
However, it seems that random = ~1|bat
was not working since R returned a warning
Warning message:
In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
extra arguments random are just disregarded.
Futhermore, I am not sure how to deal with the unbalance between gen
and bat
at dev
P28...
Also, I am not sure if the gen
and reg
factors could/should be treated as repeated measures from each batch. Repeated measures are meant to be from the same subject, but to me subject and batch are similar to each other in the sense that they both "shift" the measures in a systematic way, although hidden factors are meant to be controlled within subject and are biasing among batches. But I'm not sure if it's reasonable to compare different levels of gen
within bat
. Anyway, I tried this formula:
aov( x ~ dev*reg*gen + Error( bat / (reg*gen)))
Then dev
became much less significant compared to that of aov( x ~ dev * reg * gen, random = ~1|bat)
or aov( x ~ dev * reg * gen + bat)
, and affected less genes than did reg
.
But according to PCA plot, dev
is the strongest factor, much stronger than bat
, and reg
is the second. Also I don't know how to do multiple comparisons in this case, since Tuckey's HSD could not handle the returned values of aov
when Error
is used.
..........brain_region.gen_type.dev_stage....batch
.anteromedial_thalamus........1.....E15.5.11/17/06
.anteromedial_thalamus.......22.....E15.5.11/17/06
........frontal_cortex........1.....E15.5.11/17/06
........frontal_cortex.......22.....E15.5.11/17/06
..somatosensory_cortex........1.....E15.5.11/17/06
..somatosensory_cortex.......22.....E15.5.11/17/06
..ventrobasal_thalamus........1.....E15.5.11/17/06
..ventrobasal_thalamus.......22.....E15.5.11/17/06
.anteromedial_thalamus........1.....E15.5..5/10/07
.anteromedial_thalamus.......22.....E15.5..5/10/07
........frontal_cortex........1.....E15.5..5/10/07
........frontal_cortex.......22.....E15.5..5/10/07
..somatosensory_cortex........1.....E15.5..5/10/07
..somatosensory_cortex.......22.....E15.5..5/10/07
..ventrobasal_thalamus........1.....E15.5..5/10/07
..ventrobasal_thalamus.......22.....E15.5..5/10/07
.anteromedial_thalamus........1.....E15.5...6/1/07
.anteromedial_thalamus.......22.....E15.5...6/1/07
........frontal_cortex........1.....E15.5...6/1/07
........frontal_cortex.......22.....E15.5...6/1/07
..somatosensory_cortex........1.....E15.5...6/1/07
..somatosensory_cortex.......22.....E15.5...6/1/07
..ventrobasal_thalamus........1.....E15.5...6/1/07
..ventrobasal_thalamus.......22.....E15.5...6/1/07
.anteromedial_thalamus........1.......P28.10/19/07
.anteromedial_thalamus.......22.......P28.10/19/07
.anteromedial_thalamus.......22.......P28.10/19/07
........frontal_cortex........1.......P28.10/19/07
........frontal_cortex.......22.......P28.10/19/07
........frontal_cortex.......22.......P28.10/19/07
..somatosensory_cortex........1.......P28.10/19/07
..somatosensory_cortex.......22.......P28.10/19/07
..somatosensory_cortex.......22.......P28.10/19/07
..ventrobasal_thalamus........1.......P28.10/19/07
..ventrobasal_thalamus.......22.......P28.10/19/07
..ventrobasal_thalamus.......22.......P28.10/19/07
.anteromedial_thalamus........1.......P28.11/30/07
.anteromedial_thalamus........1.......P28.11/30/07
.anteromedial_thalamus.......22.......P28.11/30/07
........frontal_cortex........1.......P28.11/30/07
........frontal_cortex........1.......P28.11/30/07
........frontal_cortex.......22.......P28.11/30/07
..somatosensory_cortex........1.......P28.11/30/07
..somatosensory_cortex........1.......P28.11/30/07
..somatosensory_cortex.......22.......P28.11/30/07
..ventrobasal_thalamus........1.......P28.11/30/07
..ventrobasal_thalamus........1.......P28.11/30/07
..ventrobasal_thalamus.......22.......P28.11/30/07.
I'm looking forward to your help!