Description Usage Arguments Details Author(s) See Also Examples

View source: R/rating.lsmeans.R

Extracts LSMeans (produced by `lsmeans`

) from Cumulative Link (Mixed) Models (produced by `clm`

or `clmm`

), with different possible formats.

1 | ```
rating.lsmeans(lsm, type = c("prob", "cumprob", "class1", "class2"), level = 0.9)
``` |

`lsm` |
object returned by |

`type` |
type of output to be returned: |

`level` |
used only for type |

A factor named `cut`

must have been called in `lsmeans`

, to compute LSMeans per cut point (i.e. rating). Additionally, the argument `mode`

of `lsmeans`

must have been set to "linear.predictor". Finally, the call to `lsmeans`

is typically like `lsmeans(model,~factor|cut,mode="linear.predictor")`

where `factor`

is the factor (or interaction) giving levels for which LSMeans have to be computed.

Maxime Herv<e9> <mx.herve@gmail.com>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
require(ordinal)
require(lsmeans)
model <- clm(rating~contact*temp,data=wine)
LSM <- lsmeans(model,~contact:temp|cut,mode="linear.predictor")
# Probabilities
rating.lsmeans(LSM)
# Cumulative probabilities
rating.lsmeans(LSM,type="cumprob")
# Most probable rating
rating.lsmeans(LSM,type="class1")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.