tmt_rm {tmt}R Documentation

Estimation (CML) ot the Rasch model with or without multistage designs.

Description

The tmt_rm function estimates the Rasch model. If the data are collected based on a multistage design (see Zwitser and Maris, 2015) the specific multistage design mstdesign has to be submitted.

Usage

tmt_rm(
  dat,
  mstdesign = NULL,
  weights = NULL,
  start = NULL,
  sum0 = TRUE,
  se = TRUE,
  optimization = "nlminb",
  ...
)

Arguments

dat

a matrix of dichotomous (0/1) data or a list of the function tmt_designsim

mstdesign

Model for the multistage design, if CML estimation without multistage designs is required, than leave the default value

weights

is optional for the weights of cases

start

Vector of start values. If no vector is provided, the start values will be automatic generated

sum0

logical: If the item parameters should be normed to 'sum = 0' as recommended by Glas (2016, p. 208). Otherwise sum0=FALSE

se

logical: should the standard error should be estimated?

optimization

character: Per default 'nlminb' is used but 'optim' is also supported.

...

optional further arguments for optim and nlminb use control = list() with arguments.

Details

According to Glas (1988) <doi:10.3102/10769986013001045> CML estimation of item parameters is biased if the data is collected in multistage designs and this design is not considered. Zwitser and Maris (2015) <doi:10.1007/s11336-013-9369-6> propose to use an additional design matrix to fragment the elementary symmetric function. Their approach is implemented in this package. MST designs with a probabilistic instead of a deterministic routing rule (see, e.g. Chen, Yamamoto, & von Davier, 2014 <doi:10.1201/b16858>) are not estimated with this method, therefore the proposed solouting is again modified by Steinfeld and Robitzsch (2021) <doi:10.31234/osf.io/ew27f> which is also integrated into this package.

Value

List with following entries

betapar

Estimated item difficulty parameters (if sum0=FALSE, than the first item is set to 0)

se.beta

Standard errors of the estimated item parameters

loglik

Conditional log-likelihood of the model

df

Number of estimated parameters

N

Number of Persons

I

Number of items

data_orig

Submitted data frame with item responses

data

Used data frame with item responses

desmat

Design matrix

convergence

Convergence criterion

iterations

Number of iterations

hessian

Hessian-Matrix

model

Used model ((mst) for Rasch model with multistage design)

call

Submitted arguments for the function (matched call)

designelements

If the multistage version is requested, the preprocessed design is returned, otherwise NULL

mstdesign

If the multistage version is requested, the submitted design is returned, otherwise NULL

Author(s)

Jan Steinfeld

References

See Also

tmt_lrtest

Examples

# example for tmt_rm
#############################################################################
# Example-1 simple Rasch model 
#############################################################################
dat <- tmt:::sim.rm(theta = 100, b = 10, seed = 1111)
dat.rm <- tmt_rm(dat = dat)
summary(dat.rm)

#############################################################################
# Example-1 for multistage-design
#############################################################################
mstdesign <- "
  M1 =~ c(i1, i2, i3, i4, i5)
  M2 =~ c(i6, i7, i8, i9, i10)
  M3 =~ c(i11, i12, i13, i14, i15)

  # define path
  p1 := M2(0,2) + M1
  p2 := M2(3,5) + M3
"

items <- seq(-1,1,length.out = 15)
names(items) <- paste0("i",1:15)
persons = 1000

dat <- tmt_sim(mstdesign = mstdesign, 
  items = items, persons = persons)
dat.rm <- tmt_rm(dat = dat, mstdesign = mstdesign)
summary(dat.rm)

## Not run: 
  ############################################################################
  # Example-2 simple Rasch model 
  ############################################################################
  dat <- tmt:::sim.rm(theta = 100, b = 10, seed = 1111)
  dat.rm <- tmt_rm(dat = dat)
  summary(dat.rm)

  ############################################################################
  # Example-2 for multistage-design
  ############################################################################
  # also using 'paste' is possible
  mstdesign <- "
    M1 =~ paste0('i',1:5)
    M2 =~ paste0('i',6:10)
    M3 =~ paste0('i',11:15)
    M4 =~ paste0('i',16:20)
    M5 =~ paste0('i',21:25)
    M6 =~ paste0('i',26:30)

    # define path
    p1 := M4(0,2) + M2(0,2) + M1
    p2 := M4(0,2) + M2(3,5) + M3
    p3 := M4(3,5) + M5(0,2) + M3
    p4 := M4(3,5) + M5(3,5) + M6
  "
  items <- seq(-1,1,length.out = 30)
  names(items) <- paste0("i",1:30)
  persons = 1000
  dat <- tmt_sim(mstdesign = mstdesign, 
    items = items, persons = persons)
  dat.rm <- tmt_rm(dat = dat, mstdesign = mstdesign)
  summary(dat.rm)

    ############################################################################
  # Example-3 for cumulative multistage-design
  ############################################################################
  # also using 'paste' is possible
  mstdesign <- "
    M1  =~ paste0('i',21:30)
    M2  =~ paste0('i',11:20)
    M3  =~ paste0('i', 1:10)
    M4  =~ paste0('i',31:40)
    M5  =~ paste0('i',41:50)
    M6  =~ paste0('i',51:60)
    
    # define path
    p1 := M1(0, 5) += M2( 0,10) += M3
    p2 := M1(0, 5) += M2(11,15) += M4
    p3 := M1(6,10) += M5( 6,15) += M4
    p4 := M1(6,10) += M5(16,20) += M6
    "
  items <- seq(-1,1,length.out = 60)
  names(items) <- paste0("i",1:60)
  persons = 1000
  dat <- tmt_sim(mstdesign = mstdesign, 
    items = items, persons = persons)
  dat.rm <- tmt_rm(dat = dat, mstdesign = mstdesign)
  summary(dat.rm)


## End(Not run)

[Package tmt version 0.3.4-0 Index]