rating.emmeans function

EMMeans for Cumulative Link (Mixed) Models

EMMeans for Cumulative Link (Mixed) Models

Extracts EMMeans (produced by emmeans) from Cumulative Link (Mixed) Models (produced by clm or clmm), with different possible formats.

rating.emmeans(emm, type = c("prob", "cumprob", "class1", "class2"), level = 0.9)

Arguments

  • emm: object returned by emmeans applied on a clm or clmm object.
  • type: type of output to be returned: "prob" (default) gives probability of each rating, "cumprob" gives cumulative probabilities (Pi is probability to be <= to rating i), "class1" gives the most probable rating and "class2" gives the first rating for which the cumulative probability is >= to level.
  • level: used only for type "class2" (see type).

Details

A factor named cut must have been called in emmeans, to compute EMMeans per cut point (i.e. rating). Additionally, the argument mode of emmeans must have been set to "linear.predictor". Finally, the call to emmeans is typically like emmeans(model,~factor|cut,mode="linear.predictor") where factor is the factor (or interaction) giving levels for which EMMeans have to be computed.

Author(s)

Maxime HERVE maxime.herve@univ-rennes1.fr

See Also

emmeans, clm, clmm

Examples

require(ordinal) require(emmeans) model <- clm(rating~contact*temp,data=wine) EMM <- emmeans(model,~contact:temp|cut,mode="linear.predictor") # Probabilities rating.emmeans(EMM) # Cumulative probabilities rating.emmeans(EMM,type="cumprob") # Most probable rating rating.emmeans(EMM,type="class1")
  • Maintainer: Maxime HERVE
  • License: GPL-2
  • Last published: 2023-11-06

Useful links