I am trying to analyse some data using a multinomial logit model, and I have a few questions regarding its interpretation.
Essentially I have data from cells from four different tissues. Each cell can belong to one of three classes.
My dataset can be reproduced as such:
library(dplyr)
grp <- structure(list(Group = c("G1", "G2", "G3", "G1", "G2", "G3",
"G1", "G2", "G3", "G1", "G2", "G3"), Tissue = c("T1", "T1", "T1",
"T2", "T2", "T2", "T3", "T3", "T3", "T4", "T4", "T4"), Count = c(97L,
39L, 96L, 1829L, 378L, 881L, 47L, 55L, 14L, 74L, 78L, 40L)), row.names = c(NA,
-12L), class = "data.frame")
grp <- grp %>% uncount(Count)
> head(grp)
Group Tissue
1 G1 T1
1.1 G1 T1
1.2 G1 T1
1.3 G1 T1
1.4 G1 T1
1.5 G1 T1
> table(grp)
Tissue
Group T1 T2 T3 T4
G1 97 1829 47 74
G2 39 378 55 78
G3 96 881 14 40
Now I perform a multinomial logit regression using nnet::multinom
library(nnet)
model <- multinom(Group ~ Tissue, grp)
zvalues <- summary(model)$coefficients / summary(model)$standard.errors
pvalues <- pnorm(abs(zvalues), lower.tail=FALSE)*2
This shows a significant effect of tissue type on the group
> pvalues
(Intercept) TissueT2 TissueT3 TissueT4
G2 1.543861e-06 7.690904e-04 0.0001000664 0.0001125417
G3 9.426030e-01 1.505263e-06 0.0003637049 0.0129607920
I could proceed and look at the pairwise differences at each level of group and tissue, but I am wondering if there is a way of "overall" comparing different tissues.
Now, if I plot estimated marginal means using
library(emmeans)
marginals <- emmeans(model, ~ Tissue + Group)
ggplot(data.frame(marginals), aes(Group, prob, group=Tissue)) + geom_line(aes(col=Tissue))
I get
Clearly, tissues T1 and T2 show similar behaviour when compared to T3 and T4, by overall belonging less to group G2
Is there a way to formally quantifying this similarity?