Given this model:
library(ordinal)
wine2 <- wine
wine2$rating[wine2$rating==5] <- 1
wine2$rating <- ordered(wine2$rating)
fm <- clm(rating ~ response*temp, data=wine2)
how can I calculate the cum.prob
of temp
at different cuts
with emmeans
:
I thought this would work:
library(emmeans)
emmeans(fm, pairwise ~ temp, mode="cum.prob", at = list(cut=c("1|2","3|4")))
but the results are averaged across cuts, instead of showing emmeans for each cut separately
$emmeans
temp cumprob SE df asymp.LCL asymp.UCL
cold 0.380 0.0491 Inf 0.284 0.477
warm 0.433 0.0403 Inf 0.354 0.512
Results are averaged over the levels of: cut
Confidence level used: 0.95
$contrasts
contrast estimate SE df z.ratio p.value
cold - warm -0.053 0.0582 Inf -0.909 0.3632
Results are averaged over the levels of: cut
You didn't include
cut
in your specs. Also, the levels ofcut
are generated by the software.