Learn R Programming

eRm (version 0.9.0)

LRtest: Likelihood ratio model test

Description

Computation of Andersen's LR-test.

Usage

## S3 method for class 'Rm':
LRtest(object, splitcr = "median", alpha = 0.05, se = TRUE)
## S3 method for class 'LR':
plotGOF(x, beta.subset = "all", xlab = "Beta Group 1", 
ylab = "Beta Group 2", ylim = c(-3, 3), xlim = c(-3, 3), type = "p", ...)
## S3 method for class 'LR':
print(x,...)
## S3 method for class 'LR':
summary(object,...)

Arguments

object
Object of class Rm.
splitcr
Split criterion for subject raw score splitting. all.r corresponds to a full raw score split, median uses the median as split criterion, mean performs a mean-split. Optionally splitcr can also be
alpha
Significance level for Chi-square statistic.
se
If TRUE, standard errors are computed
x
Object of class LR for visualizing the fit of single items.
beta.subset
Either a numeric vector or a character vector indicating the columns of the data matrix which should be plotted. If "all", all items are plotted.
xlab
Label of the x-axis.
ylab
Label of the y-axis.
xlim
Parameter range for group 1.
ylim
Parameter range for group 2.
type
Type of plot desired. By default points are plotted.
...
Additional plot parameters.

Value

  • LRtest returns an object of class LR containing:
  • LRLR-value.
  • dfDegrees of freedom of the test statistic.
  • ChisqChi-square value with corresponding df and alpha.
  • pvalueP-value of the test.
  • likgroupLog-likelihood values for the subgroups
  • betalistList of beta parameters for the subgroups.

References

Andersen, E. B. (1973). A goodness of fit test for the Rasch model. Psychometrika, 38, 123-140. Mair, P., and Hatzinger, R. (2007). Extended Rasch modeling: The eRm package for the application of IRT models in R. Journal of Statistical Software, 20(9), 1-20.

See Also

Waldtest

Examples

Run this code
# LR-test on dichotomous Rasch model with median split
data(raschdat1)
res <- RM(raschdat1)
lrres <- LRtest(res)
print(lrres)
summary(lrres)
plotGOF(lrres)

# LR-test on dichotomous Rasch model with user-specified split
splitvec <- sample(1:3, 100, replace = TRUE)          #3 random subgroups
lrres <- LRtest(res, splitcr = splitvec)
print(lrres)
summary(lrres)
plotGOF(lrres)

Run the code above in your browser using DataLab