R: Tukey posthoc tests for nnet multinom multinomial fit to test for overall differences in multinomial distribution
Just received a kind message of Russ Lenth, and he thought the syntax to do these pairwise comparisons among lakes to test for differences in the multinomial distribution of what food items the alligators eat would be
lsm = lsmeans(fit, ~ lake|food, mode = "latent")cmp = contrast(lsm, method="pairwise", ref=1) test = test(cmp, joint=TRUE, by="contrast") There are linearly dependent rows - df are reduced accordinglytest contrast df1 df2 F p.value george - hancock 4 24 3.430 0.0236 george - oklawaha 4 24 2.128 0.1084 george - trafford 4 24 3.319 0.0268 hancock - oklawaha 4 24 5.820 0.0020 hancock - trafford 4 24 5.084 0.0041 oklawaha - trafford 4 24 1.484 0.2383
Thanks Russ!