#############################################################################
# EXAMPLE 1: Linking item parameters of the PISA study
#############################################################################
data(data.pisaPars)
pars <- data.pisaPars
# linking the two studies with the Rasch model
mod <- sirt::equating.rasch(x=pars[,c("item","study1")], y=pars[,c("item","study2")])
## Mean.Mean Haebara Stocking.Lord
## 1 0.08828 0.08896269 0.09292838
if (FALSE) {
#*** linking using the plink package
# The plink package is not available on CRAN anymore.
# You can download the package with
# utils::install.packages("plink", repos="http://www2.uaem.mx/r-mirror")
library(plink)
I <- nrow(pars)
pm <- plink::as.poly.mod(I)
# linking parameters
plink.pars1 <- list( "study1"=data.frame( 1, pars$study1, 0 ),
"study2"=data.frame( 1, pars$study2, 0 ) )
# the parameters are arranged in the columns:
# Discrimination, Difficulty, Guessing Parameter
# common items
common.items <- cbind("study1"=1:I,"study2"=1:I)
# number of categories per item
cats.item <- list( "study1"=rep(2,I), "study2"=rep(2,I))
# convert into plink object
x <- plink::as.irt.pars( plink.pars1, common.items, cat=cats.item,
poly.mod=list(pm,pm))
# linking using plink: first group is reference group
out <- plink::plink(x, rescale="MS", base.grp=1, D=1.7)
# summary for linking
summary(out)
## ------- group2/group1* -------
## Linking Constants
##
## A B
## Mean/Mean 1.000000 -0.088280
## Mean/Sigma 1.000000 -0.088280
## Haebara 1.000000 -0.088515
## Stocking-Lord 1.000000 -0.096610
# extract linked parameters
pars.out <- plink::link.pars(out)
}
Run the code above in your browser using DataLab