Description Usage Arguments Details Value Author(s) References See Also Examples
Simulation of response patterns and computation of the probability of the patterns according to the one, two, three and four parameters logistic item response models.~
1 2 3 4 5 6 7 8 9 | gr4pl(N = 10, theta = 0, a = 1, b = 0, c = 0, d = 1)
ggr4pl(n = 5, rep = 1, theta = 0, a = rep(1, n), b = rep(0, n),
c = rep(0, n), d = rep(1, n))
pggr4pl(x = ggr4pl(rep = 1), rep = 1, n = dim(x)[2], N = dim(x)[1],
theta = rep(0, N), a = rep(1, n), b = rep(0, n), c = rep(0, n),
d = rep(1, n), log.p=FALSE, TCC = FALSE)
|
theta |
numeric; vector of proficiency levels (z sscores). |
x |
numeric matrix; response patterns (0 or 1). |
rep |
numeric; number of replications of the simulation of the response patterns. |
n |
numeric; number of items. |
N |
numeric; number of response patterns |
a |
numeric; item discrimination parameters. |
b |
numeric; item difficulty parameters. |
c |
numeric; item pseudo-guessing parameters. |
d |
numeric; item inattention parameters. |
log.p |
logical; if TRUE, probabilities p are given as log(p). |
TCC |
logical; if TRUE generate the TCC figures for each response patterns. Default FALSE. |
The function gr4pl
generates N
responses to an item according to the theta parameter and the items parameters.
The funcfion ggr4pl
will be used to generate rep
respose patterns at n
items. To compute
the probability of the response patterns, according to known person and item parameters, the function pggr4pl
will be applied.
gr4pl |
numeric; vector of item responses (0 or 1). |
ggr4pl |
numeric; data.frame of responses at n items. |
pggr4pl |
logical; if (TCC ==TRUE) return(list(prob=prob, tcc=tcc)); if (TCC==FALSE) return(prob) |
Gilles Raiche, Universite du Quebec a Montreal (UQAM),
Departement d'education et pedagogie
Raiche.Gilles@uqam.ca, http://www.er.uqam.ca/nobel/r17165/
Hambleton, R. K. and Swaminathan, H. (1985). Item response theory - Principles and applications. Boston, Massachuset: Kluwer.
grm4pl
, ggrm4pl
, pggrm4pl
,
ctt2irt
, irt2ctt
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 30 31 32 33 34 35 36 37 38 | ## Not run:
## ....................................................................
# Generation of reponses (0,1) from r4pl() for N subjects (default value of N= 10)
gr4pl(c = 1)
gr4pl(N = 5, theta = c(-4, 4), c = 0)
# Generation of a 7 responses pattern (0,1) for [rep * length(theta)] subjects
# The subjects number is equal to [rep * length(theta)]]
# a,b,c et d are item parameters vectors
nitems <- 7
N <- 10
a <- rep(1, nitems)
b <- rnorm(nitems)
c <- rep(0, nitems)
d <- rep(1, nitems)
theta <- seq(-4,4,length=5)
x <- ggr4pl(n = nitems, rep = N, theta = theta, a = a, b = b, c = c, d = d)
x
## Probability of a 10 responses pattern and test caracteristic curve (TCC)
nitems <- 10
a <- rep(1,nitems)
b <- seq(-4,4,length=nitems)
c <- rep(0,nitems)
d <- rep(1,nitems)
N <- 3
theta <- seq(-1,1,length=12)
# Generation of the response patterns
x <- ggr4pl(n = nitems, rep = N, theta = theta, a = a, b = b, c = c, d = d)
x
# Without TCC
res <- pggr4pl(x=x, rep=N, theta=theta,a=a,c=c,d=d,TCC=FALSE); res
# With TCC for each response pattern
res <- pggr4pl(x=x, rep=N, theta=theta,a=a,c=c,d=d,TCC=TRUE); res
## ....................................................................
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.