IRT.repDesign {CDM} | R Documentation |
Generation of a Replicate Design for IRT.jackknife
Description
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.
Usage
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)
Arguments
data |
Dataset which must contain weights and item responses |
wgt |
Vector with sample weights |
jktype |
Type of jackknife procedure for creating the BIFIE.data object.
|
jkzone |
Variable name for jackknife zones.
If |
jkrep |
Variable name containing Jackknife replicates |
jkfac |
Factor for multiplying jackknife replicate weights.
If |
fayfac |
Fay factor. For Jackknife, the default is 1. For a Bootstrap with
|
wgtrep |
Already available replicate design |
ngr |
Number of groups |
Nboot |
Number of bootstrap samples |
seed |
Random seed |
Value
A list with following entries
wgt |
Vector with weights |
wgtrep |
Matrix containing the replicate design |
fayfac |
Fay factor needed for Jackknife calculations |
See Also
See IRT.jackknife
for further examples.
See the BIFIE.data.jack
function in the BIFIEsurvey package.
Examples
## Not run:
# 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 )
## End(Not run)