Classical Test Theory Based Statistics and Plots
This function computes some item statistics based on classical test theory.
tam.ctt(resp, wlescore=NULL, pvscores=NULL, group=NULL, progress=TRUE) tam.ctt2(resp, wlescore=NULL, group=NULL, allocate=30, progress=TRUE) tam.ctt3(resp, wlescore=NULL, group=NULL, allocate=30, progress=TRUE, max_ncat=30, pweights=NULL) plotctt( resp, theta, Ncuts=NULL, ask=FALSE, col.list=NULL, package="lattice", ... )
resp |
A data frame with unscored or scored item responses |
wlescore |
A vector with person parameter estimates, e.g. weighted likelihood
estimates obtained from |
pvscores |
A matrix with plausible values, e.g. obtained from |
group |
Vector of group identifiers if descriptive statistics shall be groupwise calculated |
progress |
An optional logical indicating whether computation progress should be displayed. |
allocate |
Average number of categories per item. This argument is just used for matrix size allocations. If an error is produced, use a sufficiently higher number. |
max_ncat |
Maximum number of categories of variables for which frequency tables should be computed |
pweights |
Optional vector of person weights |
theta |
A score to be conditioned |
Ncuts |
Number of break points for |
ask |
A logical which asks for changing the graphic from item to item.
The default is |
col.list |
Optional vector of colors for plotting |
package |
Package used for plotting. Can be |
... |
Further arguments to be passed. |
The functions tam.ctt2
and tam.ctt3
use Rcpp code
and are slightly faster.
However, only tam.ctt
allows the input of wlescore
and
pvscores
.
A data frame with following columns:
index |
Index variable in this data frame |
group |
Group identifier |
itemno |
Item number |
item |
Item |
N |
Number of students responding to this item |
Categ |
Category label |
AbsFreq |
Absolute frequency of category |
RelFreq |
Relative frequency of category |
rpb.WLE |
Point biserial correlation of an item category and the WLE |
M.WLE |
Mean of the WLE of students in this item category |
SD.WLE |
Standard deviation of the WLE of students in this item category |
rpb.PV |
Point biserial correlation of an item category and the PV |
M.PV |
Mean of the PV of students in this item category |
SD.PV |
Standard deviation of the PV of students in this item category |
For dichotomously scored data, rpb.WLE
is the ordinary point biserial
correlation of an item and a test score (here the WLE).
## Not run: ############################################################################# # EXAMPLE 1: Multiple choice data data.mc ############################################################################# data(data.mc) # estimate Rasch model for scored data.mc data mod <- TAM::tam.mml( resp=data.mc$scored ) # estimate WLE w1 <- TAM::tam.wle( mod ) # estimate plausible values set.seed(789) p1 <- TAM::tam.pv( mod, ntheta=500, normal.approx=TRUE )$pv # CTT results for raw data stat1 <- TAM::tam.ctt( resp=data.mc$raw, wlescore=w1$theta, pvscores=p1[,-1] ) stat1a <- TAM::tam.ctt2( resp=data.mc$raw, wlescore=w1$theta ) # faster stat1b <- TAM::tam.ctt2( resp=data.mc$raw ) # only frequencies stat1c <- TAM::tam.ctt3( resp=data.mc$raw, wlescore=w1$theta ) # faster # plot empirical item response curves plotctt( resp=data.mc$raw, theta=w1$theta, Ncuts=5, ask=TRUE) # use graphics for plot plotctt( resp=data.mc$raw, theta=w1$theta, Ncuts=5, ask=TRUE, package="graphics") # change colors col.list <- c( "darkred", "darkslateblue", "springgreen4", "darkorange", "hotpink4", "navy" ) plotctt( resp=data.mc$raw, theta=w1$theta, Ncuts=5, ask=TRUE, package="graphics", col.list=col.list ) # CTT results for scored data stat2 <- TAM::tam.ctt( resp=data.mc$scored, wlescore=w1$theta, pvscores=p1[,-1] ) # descriptive statistics for different groups # define group identifier group <- c( rep(1,70), rep(2,73) ) stat3 <- TAM::tam.ctt( resp=data.mc$raw, wlescore=w1$theta, pvscores=p1[,-1], group=group) stat3a <- TAM::tam.ctt2( resp=data.mc$raw, wlescore=w1$theta, group=group) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.