Title: | IRT Models for Polytomous and Continuous Item Responses |
---|---|
Description: | Estimates the multidimensional polytomous Rasch model (Rasch, 1961) and the Continuous Rating Scale model (Mueller, 1987). |
Authors: | Christine Hohensinn [cre,aut] |
Maintainer: | Christine Hohensinn <[email protected]> |
License: | GPL-3 |
Version: | 0.2.3 |
Built: | 2024-11-23 04:02:29 UTC |
Source: | https://github.com/christinehohensinn/pcirt |
The multidimensional polytomous Rasch model (Rasch, 1961) can be estimated with pcIRT. It provides functions to set linear restrictions on the item category parameters of this models. With this functions it is possible to test whether item categories can be collapsed or set as linear dependent. Thus it is also possible to test whether the multidimensional model can be reduced to a unidimensional model that is whether item categories represent a unidimensional continuum. For this case the scoring parameter of the categories is estimated.
This package estimates the Continuous Rating Scale model by Mueller (1987). It is an extension of the Rating Scale Model by Andrich (1978) on continuous responses (e.g. taken by a visual analog scale).
Package: | pcIRT |
Type: | Package |
Version: | 0.1 |
Date: | 2013-11-13 |
License: | GPL-3 |
Christine Hohensinn Maintainer: Christine Hohensinn <[email protected]>
Andersen, E. B. (1995). Polytomous Rasch models and their estimation. In G. H. Fischer and I. Molenaar (Eds.). Rasch Models - Foundations, Recent Developements, and Applications. Springer.
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
Hohensinn, C. (2018). pcIRT: An R Package for Polytomous and Continuous Rasch Models. Journal of Statistical Software, Code Snippets, 84(2), 1-14. doi:10.18637/jss.v084.c02
Mueller, H. (1987). A Rasch model for continuous ratings. Psychometrika, 52, 165-181.
Rasch, G. (1961). On general laws and the meaning of measurement in psychology, Proceedings Fourth Berekely Symposium on Mathematical Statistiscs and Probability 5, 321-333.
#simulate data set according to the multidimensional polytomous Rasch model (MPRM) simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate MPRM item parameters res_mprm <- MPRM(simdat$datmat) summary(res_mprm)
#simulate data set according to the multidimensional polytomous Rasch model (MPRM) simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate MPRM item parameters res_mprm <- MPRM(simdat$datmat) summary(res_mprm)
Estimation of the Rating Scale Model for continuous data by Mueller (1987).
CRSM(data, low, high, start, conv = 1e-04) ## S3 method for class 'CRSM' print(x, ...) ## S3 method for class 'CRSM' summary(object, ...)
CRSM(data, low, high, start, conv = 1e-04) ## S3 method for class 'CRSM' print(x, ...) ## S3 method for class 'CRSM' summary(object, ...)
data |
Data matrix or data frame; rows represent observations (persons), columns represent the items. |
low |
The minimum value of the response scale (on which the data are based). |
high |
The maximum value of the response scale (on which the data are based). |
start |
Starting values for parameter estimation. If missing, a vector of 0 is used as starting values. |
conv |
Convergence criterium for parameter estimation. |
x |
object of class |
... |
... |
object |
object of class |
Parameters are estimated by a pairwise conditional likelihood estimation (a pseudo-likelihood approach, described in Mueller, 1999).
The parameters of the Continuous Rating Scale Model are estimated by a pairwise cml approach using Newton-Raphson iterations for optimizing.
data |
data matrix according to the input |
data_p |
data matrix with data transformed to a response interval between 0 and 1 |
itempar |
estimated item parameters |
itempar_se_low |
estimated lower boundary for standard errors of estimated item parameters |
itempar_se_up |
estimated upper boundary for standard errors of estimated item parameters |
itempar_se |
estimated mean standard errors of estimated item parameters |
disppar |
estimated dispersion parameter |
disppar_se_low |
estimated lower boundary for standard errors of estimated dispersion parameter |
disppar_se_up |
estimated upper boundary for standard errors of estimated dispersion parameter |
itempar_se |
estimated mean standard errors of estimated item parameter |
disp_est |
estimated dispersion parameters for all item pairs |
iterations |
Number of Newton-Raphson iterations for each item pair |
low |
minimal data value entered in call |
high |
maximal data value entered in call |
call |
call of the CRSM function |
Christine Hohensinn
Mueller, H. (1987). A Rasch model for continuous ratings. Psychometrika, 52, 165-181.
Mueller, H. (1999). Probabilistische Testmodelle fuer diskrete und kontinuierliche Ratingskalen. [Probabilistic models for discrete and continuous rating scales]. Bern: Huber.
#estimate CRSM item parameters data(analog) res_crsm <- CRSM(extraversion, low=-10, high=10) summary(res_crsm)
#estimate CRSM item parameters data(analog) res_crsm <- CRSM(extraversion, low=-10, high=10) summary(res_crsm)
This function tests whether the multidimensional polytomous Rasch model can be reduced to a unidimensional polytomous model.
dLRT(MPRMobj) ## S3 method for class 'dLR' print(x, ...) ## S3 method for class 'dLR' summary(object, ...)
dLRT(MPRMobj) ## S3 method for class 'dLR' print(x, ...) ## S3 method for class 'dLR' summary(object, ...)
MPRMobj |
Object of class |
x |
object of class |
... |
... |
object |
object of class |
For this test, a unidimensional model assuming the categories as linearly dependent is computed. Subsequently a Likelihood Ratio test is conducted.
emp_Chi2 |
|
df |
degrees of freedom of the test statistic |
pval |
p value of the test statistic |
Christine Hohensinn
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
#simulate data set simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate MPRM item parameters res_mprm <- MPRM(simdat$datmat) res_dlrt <- dLRT(res_mprm) summary(res_dlrt)
#simulate data set simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate MPRM item parameters res_mprm <- MPRM(simdat$datmat) res_dlrt <- dLRT(res_mprm) summary(res_dlrt)
This function estimates the dichotomous Rasch model by Rasch (1960).
DRM(data, desmat, start, control) ## S3 method for class 'DRM' print(x, ...) ## S3 method for class 'DRM' summary(object, ...)
DRM(data, desmat, start, control) ## S3 method for class 'DRM' print(x, ...) ## S3 method for class 'DRM' summary(object, ...)
data |
Data matrix or data frame; rows represent observations (persons), columns represent the items. |
desmat |
Design matrix; if missing, the design matrix for a dichotomous Rasch model will be created automatically. |
start |
starting values for parameter estimation. If missing, a vector of 0 is used as starting values. |
control |
list with control parameters for the estimation process e.g. the convergence criterion. For details please see the help pages to the R built-in function |
x |
object of class |
... |
... |
object |
object of class |
Parameters are estimated by CML.
data |
data matrix according to the input |
design |
design matrix either according to the input or according to the automatically generated matrix |
logLikelihood |
conditional log-likelihood |
estpar |
estimated basic item parameters |
estpar_se |
estimated standard errors for basic item parameters |
itempar |
estimated item parameters |
itempar_se |
estimated standard errors for item parameters |
hessian |
Hessian matrix |
convergence |
convergence of solution
(see help files in |
fun_calls |
number of function
calls (see help files in |
Christine Hohensinn
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
Rasch, G. (1960). Probabalistic models for some intelligence and attainment tests. Danmarks paedagogiske institut.
#estimate Rasch model parameters data(reason) res_drm <- DRM(reason.test[,1:11]) summary(res_drm)
#estimate Rasch model parameters data(reason) res_drm <- DRM(reason.test[,1:11]) summary(res_drm)
This object contains data from an extraversion scale . The data set consists of 8 items and 150 persons.
A matrix with 8 variables and 150 observations.
Study
A graphical model check is performed for the multidimensional polytomous Rasch model or the continuous Rating Scale Model.
## S3 method for class 'CRSM' gmc(object, splitcrit = "score", ...) gmc(object, ...) ## S3 method for class 'aLR' gmc(object, ...)
## S3 method for class 'CRSM' gmc(object, splitcrit = "score", ...) gmc(object, ...) ## S3 method for class 'aLR' gmc(object, ...)
object |
Object of class |
splitcrit |
Vector or the character vector |
... |
... |
The graphical model check plots the item parameter estimates of two
subsamples to check the homogeneity. This is according to the subsample
split in Andersen's Likelihood Ratio test. For conducting the graphical
model check of the MPRM, at first, a LRT
has to be computed
and the resulting object is the input for the gmc
function.
For plotting a graphical model check for the CRSM, the model has to be
estimated with CRSM
and subsequently the resulting object is
the input for the gmc
function. For the CRSM a split criterion has to
be input as vector.
Christine Hohensinn
Wright, B.D., and Stone, M.H. (1999). Measurement Essentials. Wilmington: Wide Range Inc.
#estimate CRSM for the first three items data(analog) res_cr <- CRSM(extraversion, low=-10, high=10) #graphical model check for CRSM for the first three items with default split #criterion score gmc(res_cr)
#estimate CRSM for the first three items data(analog) res_cr <- CRSM(extraversion, low=-10, high=10) #graphical model check for CRSM for the first three items with default split #criterion score gmc(res_cr)
The item characteristic curve is performed for the multidimensional polytomous Rasch model or the continuous Rating Scale Model.
## S3 method for class 'CRSM' iccplot(object, items = "all", ...) ## S3 method for class 'DRM' iccplot(object, items = "all", ...) ## S3 method for class 'MPRM' iccplot(object, items = "all", ...) iccplot(object, ...)
## S3 method for class 'CRSM' iccplot(object, items = "all", ...) ## S3 method for class 'DRM' iccplot(object, items = "all", ...) ## S3 method for class 'MPRM' iccplot(object, items = "all", ...) iccplot(object, ...)
object |
Object of class |
items |
Character vector |
... |
... |
The item characteristic curve (ICC) plots the response probability depending on person and item parameter.
For plotting the ICC, the object resulting from MPRM MPRM
or CRSM CRSM
or DRM DRM
is the input for the iccplot
function.
The default argument items="all"
displays ICC curves for all items in the object. With a numeric vector items
, a subset of
items can be selected for which ICC plots are displayed.
Christine Hohensinn
#estimate CRSM for the first three items data(analog) res_cr <- CRSM(extraversion, low=-10, high=10) #ICC plot iccplot(res_cr)
#estimate CRSM for the first three items data(analog) res_cr <- CRSM(extraversion, low=-10, high=10) #ICC plot iccplot(res_cr)
Andersen's Likelihood Ratio Test is a model test for Rasch models (based on CML estimation) and splits the data set into subsamples to test the person homogeneity
## S3 method for class 'DRM' LRT(object, splitcrit = "score", ...) ## S3 method for class 'MPRM' LRT(object, splitcrit = "score", ...) LRT(object, ...) ## S3 method for class 'aLR' print(x, ...) ## S3 method for class 'aLR' summary(object, ...)
## S3 method for class 'DRM' LRT(object, splitcrit = "score", ...) ## S3 method for class 'MPRM' LRT(object, splitcrit = "score", ...) LRT(object, ...) ## S3 method for class 'aLR' print(x, ...) ## S3 method for class 'aLR' summary(object, ...)
object |
Object of class |
splitcrit |
Vector or the character vector |
x |
Object of class aLR |
... |
further arguments |
The default split criterion "score"
computes the raw score of every
person according to the category values in the data set. The sample is split
by the median of this raw score.
emp_Chi2 |
|
df |
degrees of freedom of the test statistic |
pval |
p value of the test statistic |
itempar |
estimated item parameters for each subsample |
item_se |
estimated standard errors for the item parameters for each subsample |
Christine Hohensinn
Andersen, E. B. (1973). A goodness of fit test for the Rasch model. Psychometrika, 38, 123- 140.
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
#simulate data set simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate MPRM item parameters res_mprm <- MPRM(simdat$datmat) #compute Andersen's Likelihood Ratio test res_lrt <- LRT(res_mprm) summary(res_lrt)
#simulate data set simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate MPRM item parameters res_mprm <- MPRM(simdat$datmat) #compute Andersen's Likelihood Ratio test res_lrt <- LRT(res_mprm) summary(res_lrt)
This function estimates the multidimensional polytomous Rasch model by Rasch
(1961). The model estimates item category parameters for each
item and each category and takes each category of data as another dimension.
The functions allows setting linear restrictions on item category parameters
.
MPRM(data, desmat, ldes, lp, start, control) ## S3 method for class 'MPRM' print(x, ...) ## S3 method for class 'MPRM' summary(object, ...)
MPRM(data, desmat, ldes, lp, start, control) ## S3 method for class 'MPRM' print(x, ...) ## S3 method for class 'MPRM' summary(object, ...)
data |
Data matrix or data frame; rows represent observations (persons), columns represent the items |
desmat |
Design matrix |
ldes |
a numeric vector of the same length as the number of item category parameters indicating which parameters are set linear dependent of which other parameters (see details) |
lp |
a numeric vector with length equal to the number of item parameters set linear dependent. The vector indicates the number of scoring parameters (see details) |
start |
Starting values for parameter estimation. If missing, a vector of 0 is used as starting values. |
control |
list with control parameters for the estimation process e.g. the convergence criterion. For details please see the help pages to the R built-in function |
x |
object of class |
... |
... |
object |
object of class |
Parameter estimations is done by CML method.
#' The parameters of the multidimensional polytomous Rasch model (Rasch, 1961)
are estimated by CML estimation. For the CML estimation no assumption on the
person parameter distribution is necessary. Furthermore linear restrictions can be set on the
multidimensional polytomous Rasch model. Item category parameters can be set
as being linear dependent to other item category parameters and the scoring
parameter (as the multiple of the linear dependen parameters) is estimated.
The restrictions are set by defining the arguments ldes
and
lp
. ldes
is a numerical vector of the same length as item
category parameters in the general MPRM. A 0 in this vector indicates that
no restriction is set. Putting in another number sets the item category
parameter according to the vector position as linear dependent to that item
category parameter with the position of the number included. For example, if
item category parameter of item 1 and category 2 (that is position 2 in the
vector ldes
) should be linear dependent to the item category
parameter of item 1 and category 1 (that is position 1 in the vector
ldes
), than the number 1 has to be on the second element of vector
ldes
. With the vector lp
it is set, how many different scoring
parameters have to be estimated and (if there are more than two) which of
them should be equal. For example if 5 item category parameters are set
linear dependent (by ldes
) and according to the ldes
vector
the first, third and fourth have the same scoring parameters and the second
and fifth have another scoring parameter, than lp
must be a vector
lp = c(1,2,1,1,2)
.
It is necessary that the design matrix is specified in accordance with the
restrictions in ldes
and lp
.
data |
data matrix according to the input |
design |
design matrix according to the input |
logLikelihood |
conditional log-likelihood |
estpar |
estimated basic item category parameters |
estpar_se |
estimated standard errors for basic item category parameters |
itempar |
estimated item category parameters |
itempar_se |
estimated standard errors for item category parameters |
linpar |
estimated scoring parameters |
linpar_se |
estimated standard errors for scoring parameters |
hessian |
Hessian matrix |
convergence |
convergence of solution (see help files in
|
fun_calls |
number of function calls (see help
files in |
Christine Hohensinn
Andersen, E. B. (1974). Das mehrkategorielle logistische Testmodell [The polytomous logistic test model] In. W. F. Kempf (Ed.), Probabilistische Modelle in der Sozialpsychologie [Probabilistic model in social psychology]. Bern: Huber.
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
Rasch, G. (1961). On general laws and the meaning of measurement in psychology, Proceedings Fourth Berekely Symposium on Mathematical Statistiscs and Probability 5, 321-333.
#simulate data set according to the general MPRM simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate the MPRM without any restrictions res_mprm <- MPRM(simdat$datmat) #estimate a MPRM with linear restrictions; #for item 1 and 2 the second category is set linear dependent to the first #category ldes1 <- rep(0,length(res_mprm$itempar)) ldes1[c(2,5)] <- c(1,4) lp1 <- rep(1,2) #take the design matrix from the general MPRM and modify it according to the #linear restriction design1 <- res_mprm$design design1[2,1] <- 1 design1[5,3] <- 1 design1[11,c(1,3)] <- -1 design1 <- design1[,-c(2,4)] res_mprm2 <- MPRM(simdat$datmat, desmat=design1, ldes=ldes1, lp=lp1) summary(res_mprm2)
#simulate data set according to the general MPRM simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate the MPRM without any restrictions res_mprm <- MPRM(simdat$datmat) #estimate a MPRM with linear restrictions; #for item 1 and 2 the second category is set linear dependent to the first #category ldes1 <- rep(0,length(res_mprm$itempar)) ldes1[c(2,5)] <- c(1,4) lp1 <- rep(1,2) #take the design matrix from the general MPRM and modify it according to the #linear restriction design1 <- res_mprm$design design1[2,1] <- 1 design1[5,3] <- 1 design1[11,c(1,3)] <- -1 design1 <- design1[,-c(2,4)] res_mprm2 <- MPRM(simdat$datmat, desmat=design1, ldes=ldes1, lp=lp1) summary(res_mprm2)
This function performs the estimation of person parameters for the multidimensional polytomous Rasch model or the continuous Rating Scale model.
## S3 method for class 'CRSM' person_par(object, ...) ## S3 method for class 'MPRM' person_par(object, ..., set0 = FALSE) person_par(object, ...)
## S3 method for class 'CRSM' person_par(object, ...) ## S3 method for class 'MPRM' person_par(object, ..., set0 = FALSE) person_par(object, ...)
object |
Object of class |
... |
... |
set0 |
if |
The estimation is performed by Maximum Likelihood Estimation. Thus, parameters for extreme scores are not calculated!
ptable |
table showing for each (observed) raw score the corresponding estimated person parameter and standard error |
pparList |
for each person raw score, estimated person parameter and the standard error is displayed |
fun_calls |
number of function calls |
call |
function call |
Christine Hohensinn
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
Mueller, H. (1999). Probabilistische Testmodelle fuer diskrete und kontinuierliche Ratingskalen. [Probabilistic models for discrete and continuous rating scales]. Bern: Huber.
#estimate CRSM for the first four items data(analog) res_cr <- CRSM(extraversion, low=-10, high=10) #estimate person parameters for CRSM pp <- person_par(res_cr)
#estimate CRSM for the first four items data(analog) res_cr <- CRSM(extraversion, low=-10, high=10) #estimate person parameters for CRSM pp <- person_par(res_cr)
This functions tests the fit of fixed scoring parameters in a unidimensional polytomous Rasch model.
## S3 method for class 'wt' print(x, ...) ## S3 method for class 'wt' summary(object, ...) weight_test(MPRMobj, score_param)
## S3 method for class 'wt' print(x, ...) ## S3 method for class 'wt' summary(object, ...) weight_test(MPRMobj, score_param)
x |
object of class |
... |
... |
object |
object of class |
MPRMobj |
Object of class |
score_param |
Numerical vector with the scoring parameters that are tested |
If the unidimensional polytomous Rasch model fits the data, the weight test can be performed to test whether assumed scoring parameters are appropriate. An unconstrained unidimensional polytomous Rasch model is calculated including estimation of scoring parameters. Furthermore a constrained unidimensional polytomous Rasch model is estimated with fixed scoring parameters (according to the input). Subsequently a Likelihood Ratio test tests the fit of the fixed scoring parameters.
emp_Chi2 |
|
df |
degrees of freedom of the test statistic |
pval |
p value of the test statistic |
unconstrLoglikelihood |
log-likelihood of the unconstrained model |
constrLoglikelihood |
log-likelihood of the constrained model |
unconstrNrPar |
number of estimated parameters in the unconstrained model |
constrNrPar |
number of estimated parameters in the constrained model |
unconstrItempar |
estimated item parameters of the unconstrained model |
constrItempar |
estimated item parameters of the constrained model |
unconstrScoreParameter |
estimated scoring parameters of the unconstrained model |
Christine Hohensinn
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
#simulate data set simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate MPRM item parameters res_mprm <- MPRM(simdat$datmat) #tests the scoring parameter 0.5 for the unidimensional polytomous model res_weight <- weight_test(res_mprm, score_param=c(0.5)) summary(res_weight)
#simulate data set simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500) #estimate MPRM item parameters res_mprm <- MPRM(simdat$datmat) #tests the scoring parameter 0.5 for the unidimensional polytomous model res_weight <- weight_test(res_mprm, score_param=c(0.5)) summary(res_weight)
This object contains data from the reasoning test 'META' by Gatternig and Kubinger (1994). The test includes 11 encoding tasks.
A matrix with 22 variables and 380 observations. Variables 'I1' to 'I11' contain the responses to the eleven items, 'BT1' to 'BT11' the response times for each item in seconds.
Study
Gatternig, J. and Kubinger, K. D. (1994). Erkennen von Metaregeln. Frankfurt: Swets.
With this function data sets according to the Continous Rating Scale Model are simulated
simCRSM(itempar, disp, perspar, mid = 0.5, len = 1, seed = NULL)
simCRSM(itempar, disp, perspar, mid = 0.5, len = 1, seed = NULL)
itempar |
a numerical vector with item parameters |
disp |
a number setting the dispersion parameter for the item set |
perspar |
a numerical vector with the person parameters |
mid |
the midpoint of the response scale (on which the data set is generated) |
len |
the length of the response scale (on which the data set is generated) |
seed |
a seed for the random number generated can optionally be set |
The midpoint and the length of the response scale define the interval of the data set generated. The default of the function generates data according to a response scale between 0 and 1 - that is midpoint 0.5 and length 1.
datmat |
simulated data set |
true_itempar |
the fixed item parameters according to the input |
true_disppar |
the fixed dispersion parameter according to the input |
true_perspar |
the fixed person parameters according to the input |
Christine Hohensinn
Mueller, H. (1987). A Rasch model for continuous ratings. Psychometrika, 52, 165-181.
#set item parameters item_p <- c(-1.5,-0.5,0.5,1) #set dispersion parameter for items dis_p <- 5 #generate person parameters by a standard normal dispersion pp <- rnorm(50, 0,1) #simulate data set #this is only an illustrating example for simulating data! #In practice, a sample size of n=50 will be too small for most application #demands simdatC <- simCRSM(item_p, dis_p, pp)
#set item parameters item_p <- c(-1.5,-0.5,0.5,1) #set dispersion parameter for items dis_p <- 5 #generate person parameters by a standard normal dispersion pp <- rnorm(50, 0,1) #simulate data set #this is only an illustrating example for simulating data! #In practice, a sample size of n=50 will be too small for most application #demands simdatC <- simCRSM(item_p, dis_p, pp)
With this function data sets according to the dichotomous Rasch model (DRM) are simulated
simDRM(itempar, persons = 500, seed = NULL)
simDRM(itempar, persons = 500, seed = NULL)
itempar |
a vector with item difficulty parameters |
persons |
number of persons for the generated data set |
seed |
a seed for the random number generated can optionally be set |
Data are generated with category values 0 and 1.
Person parameters are generated by a standard normal distribution.
datmat |
simulated data set |
true_itempar |
the fixed item parameters according to the input |
true_perspar |
the fixed person parameters |
Christine Hohensinn
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
#set item parameters item_p <- c(-1.5,-0.3,0,0.3,1.5) #number of persons pn <- 500 #simulate data set simdatD <- simDRM(item_p, pn)
#set item parameters item_p <- c(-1.5,-0.3,0,0.3,1.5) #number of persons pn <- 500 #simulate data set simdatD <- simDRM(item_p, pn)
With this function data sets according to the multidimensional polytomous Rasch model (MPRM) are simulated
simMPRM(itempar, persons = 500, seed = NULL)
simMPRM(itempar, persons = 500, seed = NULL)
itempar |
a matrix with item category parameters; each row represents a category and each column an item (see details) |
persons |
an integer representing the number of persons (observations) of the data set (see details) |
seed |
a seed for the random number generated can optionally be set |
Data are generated with category values starting with 0. Thus the first row of the matrix containing the item parameters is matched to the category value 0 and so on. The last category is the reference category. Please note, that the item category parameters of the last category have to be 0 (due to parameter normalization)!
Person parameters are generated by a standard normal distribution.
datmat |
simulated data set |
true_itempar |
the fixed item parameters according to the input |
true_perspar |
the fixed person parameters |
Christine Hohensinn
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
Rasch, G. (1961). On general laws and the meaning of measurement in psychology, Proceedings Fourth Berekely Symposium on Mathematical Statistiscs and Probability 5, 321-333.
#set item parameters item_p <- rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0) #number of persons pn <- 500 #simulate data set simdatM <- simMPRM(item_p, pn)
#set item parameters item_p <- rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0) #number of persons pn <- 500 #simulate data set simdatM <- simMPRM(item_p, pn)