## Simulate 60 items loading on different Big Five dimensions,
## with different mean and item difficulty
item_dims <- sample(c("Openness","Conscientiousness","Neuroticism",
"Extraversion","Agreeableness"), 60, replace = TRUE)
item_mean <- rnorm(60, 5, 2)
item_difficulty <- runif(60, -1, 1)
## Construct data frame for item characteristics and produce
## 20 random triplet blocks with these 60 items
item_df <- data.frame(Dimensions = item_dims, Mean = item_mean,
Difficulty = item_difficulty)
solution <- make_random_block(60, 60, 3)
## See ?facfun for its use.
cal_block_energy(solution, item_chars = item_df,
weights = c(1,1,1), FUN = c("facfun", "var", "var"))
Run the code above in your browser using DataLab