inst/makeLelonde.R

require(cem)

data(LL)

ans <- c("strongly disagree", "disagree", "neutral", "agree", "strongly agree", "no opinion")

n <- dim(LL)[1]
k <- dim(LL)[2]

set.seed(123)

LeLonde <- data.frame(LL, q1 = sample(ans, n, replace=TRUE) )

idx <- sample(1:n,n*0.1)
for(i in idx){
  LeLonde[i, sample(2:(k+1),1)] <- NA
}


save(LeLonde, file="LeLonde.rda")
IQSS/cem documentation built on Oct. 10, 2022, 9:35 p.m.