Skip to contents

This function performs (robust) Haebara linking or Stocking-Lord for two groups in the 2PL model. There is also an option for simultaneous estimation in which joint item parameters should also be estimated.

Usage

linking_2groups(pars, method, type="asymm", pow=2, eps=0.001, simultan=FALSE,
     Theta=seq(-6, 6, len=101), wgt=NULL, par_init=NULL, optimizer="nlminb",
     control_optimizer=list())

Arguments

pars

Matrix containing item parameters that must have columns with names a1, b1, a2, and b2.

method

Linking method. Can be SL (Stocking-Lord) or Hae (Haebara).

type

Type of linking function. Can be "asymm" or "symm" for asymmetric or symmetric linking, respectively.

pow

Power used in the loss function. The values should be larger than or equal than zero. The default values is 2.

eps

Tuning parameter in numerical differentiation

simultan

Logical indicating whether joint item parameters should be simultaneously estimated

Theta

Theta grid

wgt

Weights for theta grid

par_init

Initial vector for parameters

optimizer

Chosen optimizer. Can be "nlminb" or "optim".

control_optimizer

Control arguments for optimizer

Value

List with following entries

par

Estimated linking parameters

$...$

More values

Examples

if (FALSE) {
#############################################################################
# EXAMPLE 1: data.ex16 from TAM package
#############################################################################

#- extract dataset
data(data.ex16, package="TAM")
dat <- data.ex16
items <- colnames(dat)[-c(1,2)]

# fit grade 1
rdat1 <- TAM::tam_remove_missings( dat[ dat$grade==1, ], items=items )
mod1 <- sirt::rasch.mml2( dat=rdat1$resp[, rdat1$items], est.a=1:length(rdat1$items) )

# fit grade 2
rdat2 <- TAM::tam_remove_missings( dat[ dat$grade==2, ], items=items )
mod2 <- sirt::rasch.mml2( dat=rdat2$resp[, rdat2$items], est.a=1:length(rdat2$items) )

# merge item parameters of separate scalings
item1 <- mod1$item[, c("item", "a","b") ]
colnames(item1)[2:3] <- c("a1","b1")
item2 <- mod2$item[, c("item", "a","b") ]
colnames(item2)[2:3] <- c("a2","b2")
pars <- merge(x=item1, y=item2, by="item")

# choose theta grid
Theta <- seq(-6,6, len=101)
wgt <- sirt::sirt_dnorm_discrete(x=Theta, mean=0, sd=2)

#- robust Haebara linking with powers 0.5 or 0 and different types
res1 <- sirt::linking_2groups(pars=pars, method="Hae", type="asymm",
              Theta=Theta, wgt=wgt, pow=0.5, eps=0.001 )
res2 <- sirt::linking_2groups(pars=pars, method="Hae", type="symm",
              Theta=Theta, wgt=wgt, pow=0, eps=0.01 )
res1$par  # linking parameter estimate
res2$par
}