MCboot: Markov Chain Monte Carlo resampling method for Rasch model

View source: R/MCboot.R

MCbootR Documentation

Markov Chain Monte Carlo resampling method for Rasch model

Description

This function computes sample distribution of test statistics for hypothesis of equality of item parameters between two groups of persons against a two-sided alternative that at least one item parameter differs between the two groups given an input matrix and a numeric covariate vector.

Usage

MCboot(
  inputmat,
  splitcr,
  n_iter,
  ctr = eRm::rsctrl(burn_in = 100, n_eff = 8000, step = 32, seed = 0),
  alpha = 0.05
)

Arguments

inputmat

A binary data matrix with n rows and k columns.

splitcr

Split criterion which is a numeric vector x with length equal to number of persons and contains zeros and ones. It indicates group membership for every person.

n_iter

Number of generated matrices (effective matrices) complying to the Rasch model.

ctr

An object of eRm class RSctr with components burn_in, n_eff, step, seed used as controls argument in rsampler.

alpha

Probability of error of first kind.

Details

MCMC binary matrices with given margin sums are computed using function rsampler of eRm package. Matrices fulfilling conditions of Fischer (1981) and showing an appropriate response pattern within subgroups are used to compute sample distributions of test statistics. Conditions on the existence and uniqueness of maximum-likelihood estimates (Fischer, 1981) are checked using graph theory implementing FORTRAN subroutine digraph_adj_components.f90 (implemented from Thulasiraman & Swamy, 1992, by Burkardt, 2020). Likelihood based test statistics are Wald (W), likelihood ratio (LR), Rao score (RS) and gradient (GR). Nonparametric test statistics are sum of squared elements of the score function and sum of the absolute values of the elements of the score function and an alternative version of the score test.

Based on sample distribution of test statistics Type I error rates and power values are computed for the hypothesis to be tested and a deviation from it.

Value

MCboot returns an object of class "MCboot" containing two lists:

MCobject

A list of results containing:

  • $eta_rest: A numeric vector containing CML estimates of item parameters of data matrix X (full model).

  • $inputmat: The input matrix.

  • $score: A numeric matrix of size k x n_iter, containing in each column the value of score function in each sample drawn.

  • $lstats: A numeric matrix of size k x n_iter, containing in each column values of test statistics in each sample drawn. See details.

  • $t: A numeric matrix of size k x n_iter, containing in each column in each column the observed values of sufficient statistic for d computed for each sample drawn.

  • $splitcr: Split criterion which is a numeric vector x with length equal to number of persons and contains zeros and ones. It indicates group membership for every person.

result_list

A list of results containing:

  • $lpwr_d0: Type I error rates for different tests.

  • $larg_min: Optimal input arguments of items from minimization of power function for different tests.

  • $pvalue: p values for different tests.

  • $plot: A list for different items containing power rates of different tests as a function of d.

  • $pwr_xtable: Tables representing power rates for different items and tests as a function of d.

  • $descr_table: Descriptive statistics for different tests under the null hypothesis based on n_iter bootstrap replications.

call

The matched call.

References

Burkardt, John. (2020, November). GRAFPACK - Graph Computations [FORTRAN90 library]. Retrieved from https://people.sc.fsu.edu/~jburkardt/f_src/grafpack/grafpack.html

Draxler, C., Kurz, A., & Lemonte, A. J. (2020). The gradient test and its finite sample size properties in a conditional maximum likelihood and psychometric modeling context. Communications in Statistics-Simulation and Computation, 1-19. https://doi.org/10.1080/03610918.2019.1710193

Draxler, C., & Dahm, S. (2020). Conditional or Pseudo Exact Tests with an Application in the Context of Modeling Response Times. Psych, 2(4), 198-208. https://doi.org/10.3390/psych2040017

Fischer, G. H. (1981). On the existence and uniqueness of maximum-likelihood estimates in the Rasch model. Psychometrika, 46(1), 59-77.

Thulasiraman, K., & Swamy, M. N. (2011). Graphs: Theory and Algorithms. New York, John Wiley & Sons.

See Also

MCplot, MCsimRasch

Examples

## Not run: 
# Choose input matrix of size 20 x 10 from dataset data.sim.rasch
y <- data.sim.rasch$inputmat_list$III$`C-III-20x10`

res <- MCboot(inputmat=y, splitcr = c(rep(0,10), rep(1,10)), n_iter = 1000)

# Generation of initial data sample
items <- c(0, -2, -1, 0, 1, 2)
x <- c( rep(0, 10), rep(1,10))

y <- MCsimRasch(N = 20, splitcr = x, items = items)$X

res2 <- MCboot(inputmat=y, splitcr = x, n_iter = 1000)


## End(Not run)

akurz1/tclboot documentation built on Oct. 23, 2022, 9:07 p.m.