simulateRatingMatrix: Simulate a rating matrix.

View source: R/simulateRatingMatrix.R

simulateRatingMatrixR Documentation

Simulate a rating matrix.

Description

This function will generate a nEvents x k scoring matrix.

Usage

simulateRatingMatrix(
  nLevels,
  k,
  k_per_event = 2,
  agree,
  nEvents = 100,
  response.probs = rep(1/nLevels, nLevels)
)

Arguments

nLevels

the number of possible outcomes there are for each rating.

k

the total number of available raters.

k_per_event

number of raters per scoring event.

agree

the percent of time the raters agree. Note that the actual agreement of the simulated matrix will vary from this value (see sample).

nEvents

the number of rating events within each matrix.

response.probs

probability weights for the distribution of scores. By default, each of the levels has equal probability of being selected. This allows situations where some responses are more common than others (e.g. 50% of students get a 3, 30% get a 2, and 20% get a 1). This is independent of the percent agreement parameter.

Value

a data frame with a simulated rating matrix.

Examples

test <- simulateRatingMatrix(nLevels = 3, k = 2, agree = 0.6, nEvents = 100)
psych::ICC(test)

jbryer/IRRsim documentation built on April 23, 2023, 1:58 a.m.