LRtest {eRm} | R Documentation |
Computation of Andersen's LR-test.
## 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,...)
The parameters for LRtest
which returns an object of class LR
are:
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 a vector which assigns each person to a
certain subgroup (e.g., following an external criterion). |
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. |
LRtest
returns an object of class LR
containing:
X |
Data matrix. |
X.list |
List of data matrices for the subgroups. |
model |
Fitted model |
LR |
LR-value. |
df |
Degrees of freedom of the test statistic. |
Chisq |
Chi-square value with corresponding df and alpha. |
pvalue |
P-value of the test. |
likgroup |
Log-likelihood values for the subgroups |
betalist |
List of beta parameters for the subgroups. |
etalist |
List of eta parameters for the subgroups. |
selist |
List of standard errors of the eta parameters. |
Patrick Mair, Reinhold Hatzinger
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.
# 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)