IRT.jackknife
IRT.repDesign.Rd
This function generates a Jackknife replicate design which is
necessary to use the IRT.jackknife
function. The function
is a wrapper to BIFIE.data.jack
in the BIFIEsurvey package.
IRT.repDesign(data, wgt=NULL, jktype="JK_TIMSS", jkzone=NULL, jkrep=NULL,
jkfac=NULL, fayfac=1, wgtrep="W_FSTR", ngr=100, Nboot=200, seed=.Random.seed)
Dataset which must contain weights and item responses
Vector with sample weights
Type of jackknife procedure for creating the BIFIE.data object.
jktype="JK_TIMSS"
refers to TIMSS/PIRLS datasets.
The type "JK_GROUP"
creates jackknife weights based on a user defined grouping,
the type "JK_RANDOM"
creates random groups.
The number of random groups can be defined in ngr.
The argument type="RW_PISA"
extracts the replicated design with
balanced repeated replicate weights from PISA datasets into objects of
class IRT.repDesign
.
Bootstrap samples can be obtained by type="BOOT"
.
Variable name for jackknife zones.
If jktype="JK_TIMSS"
, then jkzone="JKZONE"
. However,
this default can be overwritten.
Variable name containing Jackknife replicates
Factor for multiplying jackknife replicate weights.
If jktype="JK_TIMSS"
, then jkfac=2
.
Fay factor. For Jackknife, the default is 1. For a Bootstrap with \(R\) samples with replacement, the Fay factor is \(1/R\).
Already available replicate design
Number of groups
Number of bootstrap samples
Random seed
A list with following entries
Vector with weights
Matrix containing the replicate design
Fay factor needed for Jackknife calculations
See IRT.jackknife
for further examples.
See the BIFIE.data.jack
function in the BIFIEsurvey package.
if (FALSE) {
# load the BIFIEsurvey package
library(BIFIEsurvey)
#############################################################################
# EXAMPLE 1: Design with Jackknife replicate weights in TIMSS
#############################################################################
data(data.timss11.G4.AUT, package="CDM")
dat <- CDM::data.timss11.G4.AUT$data
# generate design
rdes <- CDM::IRT.repDesign( data=dat, wgt="TOTWGT", jktype="JK_TIMSS",
jkzone="JKCZONE", jkrep="JKCREP" )
str(rdes)
#############################################################################
# EXAMPLE 2: Bootstrap resampling
#############################################################################
data(sim.qmatrix, package="CDM")
q.matrix <- CDM::sim.qmatrix
# simulate data according to the DINA model
dat <- CDM::sim.din(N=2000, q.matrix=q.matrix )$dat
# bootstrap with 300 random samples
rdes <- CDM::IRT.repDesign( data=dat, jktype="BOOT", Nboot=300 )
}