I have an experiment with 3 biological factors (devdev
, dev_stage; regreg
, brain_region; gengen
, gen_type) plus a batch factor (batbat
, 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 anovaANOVA formula here :)
first, dev could not be separated from bat; second, at dev P28, gen and bat are unbalanced.
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).
aov( x ~ dev * reg * gen, random = ~1|bat)
However, it seems that random = ~1|batrandom = ~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.
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 gengen
and batbat
at devdev
P28...
Also, I am not sure if the gengen
and regreg
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 gengen
within batbat
. Anyway, I tried this formula: aov( x ~ devreggen + Error( bat / (reg*gen))).
aov( x ~ dev*reg*gen + Error( bat / (reg*gen)))
Then devdev
became much less significant compared to that of aov( x ~ dev * reg * gen, random = ~1|bat)aov( x ~ dev * reg * gen, random = ~1|bat)
or aov( x ~ dev * reg * gen + bat)aov( x ~ dev * reg * gen + bat)
, and affected less genes than did regreg
.
But accorrdingaccording to PCA plot, devdev
is the strongest factor, much stronger than batbat
, and regreg
is the second. Also I don't know how to do multiple comparisoncomparisons in this case, since TuckyHSDTuckey's HSD could not handle the returned values of aovaov
when ErrorError
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.
..........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!
best,