I have a design where mice are distributed in a two-way anova setup. With genotype (WT and KO) and treatment (Ctrl and Treat). From each mouse 5 different tissues have been extracted and the number of cells positive for a mark have been counted.
I am interested in testing if the ratio of positive to negative cells are affected by genotype and treatment and to find the effects of treatment within each genotype. All of these tests I want to do for each tissue.
The table used has this format:
Animal Genotype Treatment Tissue Positive Count M1 WT Ctrl TA Yes 25 M1 WT Ctrl TA No 10 ... M12 KO Treat EDL No 5
I have fitted the following model, using
glmer from the
ratioMod <- glmer(Positive ~ 0 + Tissue + (Treatment * Genotype):Tissue + (Tissue | Animal), data = myData, weights = Count, family = binomial)
To find the effects of treatment and genotype I used the
emRes <- emmeans(ratioMod, specs = c("Treatment", "Genotype"), by = "Tissue")
This notices that there is nesting of Treatment and Genotype in Tissue, but that seems correct to me. I found the effects (and significance) of the main effects by:
emmeans(emRes, specs = c("Treatment"), by = "Tissue", contr = "pairwise")
emmeans(emRes, specs = c("Genotype"), by = "Tissue", contr = "pairwise")
This warns that
NOTE: Results may be misleading due to involvement in interactions.
Finally I wrote my own little hack to find only the pairwise comparisons I was interested in (by subsetting the matrix generated by
pairwise.emmc here called
testFn), and found the interactions I was interested in by:
contrast(emRes, interaction = c("Treatment", "Genotype"), method = "testFn")
Is this the correct way to analyse this experiment? Is there anything I should check or worry about (such as the warning about interactions).