## 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)
item_df <- data.frame(Dimensions = item_dims,
Mean = item_mean, Difficulty = item_difficulty)
solution <- make_random_block(60, 60, 3)
item_responses <- matrix(sample(seq(1:5), 600*60, replace = TRUE), nrow = 60, byrow = TRUE)
## Automatic pairing, without use of IIAs
## See ?facfun for information about what it does
# \donttest{
sa_pairing_generalized(solution, 60, eta_Temperature = 0.01,
r = 0.999, end_criteria = 0.001,
weights = c(1,1,1),
item_chars = item_df,
FUN = c("facfun", "var", "var"))
# }
## Automatic pairing, with IIAs
# \donttest{
sa_pairing_generalized(solution, 60, eta_Temperature = 0.01,
r = 0.999, end_criteria = 0.001,
weights = c(1,1,1),
item_chars = item_df,
FUN = c("facfun", "var", "var"),
use_IIA = TRUE,
rater_chars = item_responses,
iia_weights = c(BPlin = 1, BPquad = 1,
AClin = 1, ACquad = 1))
# }
Run the code above in your browser using DataLab