The functions 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)

tam.cb( dat, wlescore=NULL, group=NULL, max_ncat=30, progress=TRUE,
             pweights=NULL, digits_freq=5)

plotctt( resp, theta, Ncuts=NULL, ask=FALSE, col.list=NULL,
       package="lattice", ... )

Arguments

resp

A data frame with unscored or scored item responses

wlescore

A vector with person parameter estimates, e.g. weighted likelihood estimates obtained from tam.wle. If wlescore=NULL is chosen in tam.ctt2, then only a frequency table of all items is produced.

pvscores

A matrix with plausible values, e.g. obtained from tam.pv

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

dat

Data frame

digits_freq

Number of digits for rounding in frequency table

theta

A score to be conditioned

Ncuts

Number of break points for theta

ask

A logical which asks for changing the graphic from item to item. The default is FALSE.

col.list

Optional vector of colors for plotting

package

Package used for plotting. Can be "lattice" or "graphics".

...

Further arguments to be passed.

Details

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.

Value

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

Note

For dichotomously scored data, rpb.WLE is the ordinary point biserial correlation of an item and a test score (here the WLE).

See also

Examples

if (FALSE) {
#############################################################################
# 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)
}