# load the BIFIEsurvey package
library(BIFIEsurvey)
#############################################################################
# EXAMPLE 1: Design with Jackknife replicate weights in TIMSS
#############################################################################
data(data.timss11.G4.AUT)
dat <- data.timss11.G4.AUT$data
# generate design
rdes <- IRT.repDesign( data= dat, wgt = "TOTWGT" , jktype="JK_TIMSS" ,
jkzone = "JKCZONE" , jkrep = "JKCREP" )
str(rdes)
#############################################################################
# SIMULATED EXAMPLE 2: Bootstrap resampling
#############################################################################
data(sim.qmatrix)
q.matrix <- sim.qmatrix
# simulate data according to the DINA model
dat <- sim.din(N=2000,q.matrix )$dat
# bootstrap with 300 random samples
rdes <- IRT.repDesign( data= dat , jktype="BOOT" , Nboot=300 )
Run the code above in your browser using DataLab