模拟Likert数据,并基于给定的N和量表得分均值/标准差

时间:2019-07-17 18:57:44

标签: r

任何人都可以推荐一种软件包或方法,该软件包或方法将基于已发布的研究参数来模拟李克特(常规)数据和综合量表得分?

  • N = 245
  • 20个项目的整数值为0-3
  • 通过对所有20个项目的回答进行求和构建的量表得分
  • 比例得分平均值19.99,标准偏差15.70

如果有可能合并观察到的Cronbach alpha为0.91的奖励积分。

到目前为止,我能做的最好的就是使用fabricatr并根据this approach的结果宽松地创建休息时间。

library(fabricatr)
library(tidyverse)

survey_data <- fabricate(
  N = 245,
  Q1 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q2 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q3 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q4 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q5 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q6 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q7 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q8 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q9 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q10 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q11 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q12 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q13 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q14 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q15 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q16 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q17 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q18 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q19 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
  Q20 = draw_likert(x = rnorm(N), breaks = c(-Inf, -0.8128, 1.225, 1.294, Inf)),
)

survey_data2 <- 
survey_data %>%
  mutate_if(is.factor, funs(fct_recode(., 
                                       `0` = "Strongly Disagree", 
                                       `1` = "Disagree",
                                       `2` = "Agree",
                                       `3` = "Strongly Agree"))) %>%
  mutate_if(is.factor, funs(as.numeric(as.character(.)))) %>%
  mutate(total = rowSums(.[2:21])) %>%
  summarise(mean = mean(total),
            sd = sd(total))

  #mean       sd
  #19.99184 3.593017

SD已关闭。

0 个答案:

没有答案