View source: R/sim.questionnaire.R
sim.questionnaire | R Documentation |
Simulate item-level questionnaire data with specified total score distribution
sim.questionnaire(
N = 100,
n_items = 10,
likert = 1:5,
total_mean = 39,
total_sd = 5,
total_min = 10,
total_max = 50
)
N |
Number of participants |
n_items |
Number of items in the questionnaire |
likert |
Vector of possible Likert scale values (e.g., 1:5) |
total_mean |
Mean of the desired total score distribution |
total_sd |
Standard deviation of the desired total score distribution |
total_min |
Minimum possible total score |
total_max |
Maximum possible total score |
Data frame with item-level responses and total scores
set.seed(123)
simdat <- sim.questionnaire(N = 100, n_items = 10, likert = 1:5, total_mean = 39, total_sd = 5, total_min = 10, total_max = 50)
summary(simdat$total)
head(simdat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.