This function applies the Likelihood Ratio Test of Andersen. Note that all persons with raw score equal to "median" are assigned to the lower group in cases of a median split. Is is also allowed to split after "mean" or submit any dichotomous vector as split criteria.
tmt_lrtest(object, split = "median", cores = NULL, se = TRUE, ...)
it is necessary to submit an object of the function mst
or nmst
default is the split criteria "median" of the raw score, optional are "mean" or any dichotomous vector
submit integer of cores you would like to apply
logical: if true, the standard error is estimated
further arguments for the tmt_rm
function
List with following entries
Submitted data frame with item responses
List of item parameters (difficulty) for each subgroup
List of standard errors of the estimated item parameters
Used model ((mst) for Rasch model with multistage design)
LR-value
Degrees of freedoms for the test statistic
P-value of the likelihood ratio test
Log-likelihoods for the subgroups
List of split vector for each subgroup
Submitted arguments for the function (matched call)
List of objects from subgroup estimation
Andersen, E. B. (1973). A goodness of fit test for the Rasch model. Psychometrika, 38(1), 123-140.
Fischer, G. H., & Molenaar, I. W. (Eds.). (2012). Rasch models: Foundations, recent developments, and applications. Springer Science & Business Media.
# example for tmt_lrtest
#############################################################################
# Example Rasch model and Likelihood Ratio Test
#############################################################################
dat <- tmt:::sim.rm(theta = 100, b = 10, seed = 1111)
#> Warning: It is necessary to set a seed for both theta and beta if no vector is passed. The specified seed was used for the theta parameters, the following is used for beta: 1112
dat.rm <- tmt_rm(dat = dat)
dat.lrt <- tmt_lrtest(dat.rm)
summary(dat.lrt)
#>
#> Likelihood ratio test (Andersen):
#>
#> Value (Chi^2): 21.545
#> df (Chi^2): 9
#> p-value: 0.01