IRT.repDesign function

Generation of a Replicate Design for IRT.jackknife

Generation of a Replicate Design for IRT.jackknife

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)

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. 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".
  • jkzone: Variable name for jackknife zones. If jktype="JK_TIMSS", then jkzone="JKZONE". However, this default can be overwritten.
  • jkrep: Variable name containing Jackknife replicates
  • jkfac: Factor for multiplying jackknife replicate weights. If jktype="JK_TIMSS", then jkfac=2.
  • fayfac: Fay factor. For Jackknife, the default is 1. For a Bootstrap with RR samples with replacement, the Fay factor is 1/R1/R.
  • wgtrep: Already available replicate design
  • ngr: Number of groups
  • Nboot: Number of bootstrap samples
  • seed: Random seed

Returns

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)