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")

Try the cem package in your browser

Any scripts or data that you put into this service are public.

cem documentation built on Sept. 8, 2022, 5:09 p.m.