#############################################################################
# EXAMPLE 1: Linking item parameters of the PISA study
#############################################################################
data(data.pisaPars)
pars <- data.pisaPars
# linking the tow studies with the Rasch model
mod <- equating.rasch(x=pars[,c("item","study1")], y=pars[,c("item","study2")])
## Mean.Mean Haebara Stocking.Lord
## 1 0.08828 0.08896269 0.09292838
# Linking with plink package
library(plink)
# define common items
I <- nrow(pars)
pm <- as.poly.mod(I)
# define item parameters for plink
plink.pars <- list( "study1" = cbind( 1 , pars$study1 , 0 ) ,
"study2" = cbind( 1 , pars$study2 , 0 ) )
# set parameter structure for plink
x <- as.irt.pars( pars=plink.pars, cbind(1:I , 1:I), cat=list(rep(2,I),rep(2,I)) ,
poly.mod=list(pm,pm) )
# linking with plink
out <- plink(x, rescale="MS", base.grp=2, D=1.7)
summary(out) # summary
## ------- group1/group2* -------
## Linking Constants
## A B
## Mean/Mean 1.000000 0.088280
## Mean/Sigma 1.000000 0.088280
## Haebara 1.000000 0.088605
## Stocking-Lord 1.000000 0.096617
constants <- link.con(out) # Extract linking constants
constants
Run the code above in your browser using DataLab