Learn R Programming

ILSAstats (version 0.3.8)

repcreate: Creation of Replicate Weights

Description

Creates replicate weights given jackknife replicates and jackknife zones.

Usage

repcreate(
  df,
  wt,
  jkzone,
  jkrep,
  repwtname,
  reps = NULL,
  method = c("TIMSS", "PIRLS", "ICILS", "ICCS")
)

Value

a data frame.

Arguments

df

a data frame.

wt

a string specifying the name of the column (within df) with the total weights.

jkzone

a string specifying the name of the column in df that contains the jackknife zone information.

jkrep

a string specifying the name of the column in df that contains the jackknife replicate information.

repwtname

a string specifying the variable names for the replicate weights.

reps

an integer indicating the number of replications to be created. If NULL the maximum number of zones will be used.

method

a string indicating the name of the large-scale assessment to determine the replication method to use. Available options are: "TIMSS", "PIRLS", "ICILS", and "ICCS".

Examples

Run this code

head(repdata)

# Creation of replicate weights
RW <- repcreate(df = repdata, # the data frame with all the information
                 wt = "wt", # the total weights column name
                 jkzone = "jkzones", # the jkzones column name
                 jkrep = "jkrep", # the jkreps column name
                 repwtname = "REPWT", # the desired name for the rep weights
                 reps = 50, # the number of replications
                 method = "ICILS") # the name of the method aka the study name

head(RW)

Run the code above in your browser using DataLab