change_test: Tests in context of measurement of change using LLTM.

Description Usage Arguments Details Value References See Also Examples

View source: R/change_test.R

Description

Computes gradient (GR), likelihood ratio (LR), Rao score (RS) and Wald (W) test statistics for hypotheses on parameters expressing change between two time points.

Usage

1

Arguments

X

data matrix containing the responses of n persons to 2k binary items. Columns 1 to k contain the responses to k items at time point 1, and columns (k+1) to 2k the responses to the same k items at time point 2.

Details

Assume all items be presented twice (2 time points) to the same persons. The data matrix X has n rows (number of persons) and 2k columns considered as virtual items. Assume a constant shift of item difficulties of each item between the 2 time points represented by one parameter. The shift parameter is the only parameter of interest. Test of hypothesis that shift parameter equals zero against the two-sided alternative that shift parameter is not equal to zero.

Value

A list of test statistics, degrees of freedom, and p-values.

test

a numeric vector of gradient (GR), likelihood ratio (LR), Rao score (RS), and Wald test statistics.

df

degrees of freedom.

pvalue

a numeric vector of corresponding p-values.

call

the matched call.

References

Fischer, G. H. (1995). The Linear Logistic Test Model. In G. H. Fischer & I. W. Molenaar (Eds.), Rasch models: Foundations, Recent Developments, and Applications (pp. 131-155). New York: Springer.

Fischer, G. H. (1983). Logistic Latent Trait Models with Linear Constraints. Psychometrika, 48(1), 3-26.

See Also

invar_test, and LLTM_test.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Numerical example with 400 persons and 4 items
# presented twice, thus 8 virtual items

# Data y generated under the assumption that shift parameter equals 0
# (no change from time point 1 to 2)

# design matrix W used only for exmaple data generation
#     (not used for estimating in change_test function)
W <- rbind(c(1,0,0,0,0),
  c(0,1,0,0,0),
  c(0,0,1,0,0),
  c(0,0,0,1,0),
  c(1,0,0,0,1),
  c(0,1,0,0,1),
  c(0,0,1,0,1),
  c(0,0,0,1,1))

# eta Parameter, first 4 are nuisance
# (easiness parameters of the 4 items at time point 1),
# last one is the shift parameter
eta <- c(-2,-1,1,2,0)

y <- eRm::sim.rasch(persons = rnorm(400), items = colSums(eta * t(W)))

res <- change_test(X = y)

res$test # test statistics
res$df # degrees of freedoms
res$pvalue # p-values

akurz1/tcl documentation built on Oct. 22, 2021, 4:10 p.m.