simulateIRR | R Documentation |
This function wraps the [IRRsim::simulateRatingMatrix()] function to estimate inter-rater reliability statistics across many simulated rating matrices. It returns a 'list' with all the runs but can be converted to a data frame using the 'as.data.frame()' function. By default this function will run the simulations in parallel using the 'parallel' package using one less the number of available cores. Set 'parallel = FALSE' to run the simulations on one thread.
simulateIRR(
nRaters = c(2),
nRatersPerEvent = nRaters,
nLevels = 4,
nEvents = 100,
nSamples = 100,
agreements = seq(0.1, 0.9, by = 0.1),
response.probs = rep(1/nLevels, nLevels),
showShinyProgress = FALSE,
showTextProgress = !showShinyProgress,
numCores = (parallel::detectCores() - 1),
parallel = (numCores > 1),
...
)
nRaters |
the number of available raters |
nRatersPerEvent |
the number of ratings for each per scoring event. |
nLevels |
the number of possible outcomes there are for each rating. |
nEvents |
the number of rating events within each matrix. |
nSamples |
the number of sample matrices to estimate at each agreement level. |
agreements |
vector of percent agreements to simulate. |
response.probs |
probability weights for the distribution of scores. See [IRRsim::simulateRatingMatrix()] for more information. |
showShinyProgress |
show progress bar as simulations are generated. |
showTextProgress |
show progress bar as simulations are generated. |
numCores |
number of cores to use if the simulation is run in parallel. |
parallel |
whether to simulated the data using multiple cores. |
... |
currently not used. |
For reproducibility using the [base::set.seed()] function be sure to set 'parallel = FALSE'.
a list of length nSamples * length(nRaters) * length(agreements)
.
Each element of the list represents one simulation with the following
values:
the number of raters used in the simulation.
the calculated percent agreement from the sample.
the specified percent agreement used for drawing the random sample.
skewness of all responses.
Kurtosis for all responses.
the difference between the most and least freqeuent responses.
ICC1 as described in Shrout and Fleiss (1979)
ICC2 as described in Shrout and Fleiss (1979)
ICC3 as described in Shrout and Fleiss (1979)
ICC1k as described in Shrout and Fleiss (1979)
ICC2k as described in Shrout and Fleiss (1979)
ICC3k as described in Shrout and Fleiss (1979)
Fleiss' Kappa for m raters as described in Fleiss (1971).
Cohen's Kappa as calculated in psych::cohen.kappa. Note that this calculated for all datasets even though it is only appropriate for two raters.
The simulated matrix
as.data.frame.IRRsim
icctest <- simulateIRR(nLevels = 3,
nRaters = 2,
nSamples = 10,
parallel = FALSE,
showTextProgress = FALSE)
summary(icctest)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.