simulate_dawid_skene_model | R Documentation |
Simulate data from the Dawid-Skene model
simulate_dawid_skene_model(pi, theta, sim_data, seed = NULL)
pi |
The pi parameter of the Dawid-Skene model. |
theta |
The theta parameter of the Dawid-Skene model. |
sim_data |
Data to guide the simulation. The data must be in the long
data format used in
|
seed |
An optional random seed to use. |
The number of raters implied by the entries in the rater column must match the number of raters implied by the passed theta parameter.
This function can also be used to simulate from the class-conditional Dawid-Skene model by specifying theta in the required form (i.e where all off-diagonal entries of the error matrices are equal.)
The passed sim_data
augmented with columns:
"z"
containing the latent class of each item,
"rating"
containing the simulated ratings.
J <- 5
K <- 4
pi <- rep(1 / K, K)
theta <- make_theta(0.7, J, K)
sim_data <- data.frame(item = rep(1:2, each = 5), rater = rep(1:5, 2))
simulations <- simulate_dawid_skene_model(pi, theta, sim_data)
simulations
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.