Learn R Programming

CDM (version 4.8-0)

IRT.repDesign: 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. 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"
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 $R$ samples with replacement, the Fay factor is $1/R$.
wgtrep
Already available replicate design
ngr
Number of groups
Nboot
Number of bootstrap samples
seed
Random seed

Value

  • A list with following entries
  • wgtVector with weights
  • wgtrepMatrix containing the replicate design
  • fayfacFay factor needed for Jackknife calculations

See Also

See IRT.jackknife for further examples. See the BIFIE.data.jack function in the BIFIEsurvey package.

Examples

Run this code
# 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