rating.prob {RVAideMemoire} | R Documentation |
Observed rating frequencies
Description
Computes observed rating frequencies per level of a factor, in various formats.
Usage
rating.prob(x, g, type = c("prob", "cumprob", "class"))
Arguments
x |
ordered factor (ratings). |
g |
factor giving groups to be compared. |
type |
type of output to be returned: |
Author(s)
Maxime HERVE <maxime.herve@univ-rennes1.fr>
Examples
require(ordinal)
data(wine)
# Frequencies
rating.prob(wine$rating,wine$contact:wine$temp)
# Cumulative frequencies
rating.prob(wine$rating,wine$contact:wine$temp,type="cumprob")
# Most frequent rating
rating.prob(wine$rating,wine$contact:wine$temp,type="class")
[Package RVAideMemoire version 0.9-83-7 Index]