Learn R Programming

TAM (version 1.6-0)

tam.ctt: Classical Test Theory Based Statistics and Plots

Description

This function computes some item statistics based on classical test theory.

Usage

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)

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.
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.

Value

  • A data frame with following columns:
  • indexIndex variable in this data frame
  • groupGroup identifier
  • itemnoItem number
  • itemItem
  • NNumber of students responding to this item
  • CategCategory label
  • AbsFreqAbsolute frequency of category
  • RelFreqRelative frequency of category
  • rpb.WLEPoint biserial correlation of an item category and the WLE
  • M.WLEMean of the WLE of students in this item category
  • SD.WLEStandard deviation of the WLE of students in this item category
  • rpb.PVPoint biserial correlation of an item category and the PV
  • M.PVMean of the PV of students in this item category
  • SD.PVStandard deviation of the PV of students in this item category

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.

See Also

http://www.edmeasurementsurveys.com/TAM/Tutorials/4CTT.htm

Examples

Run this code
#############################################################################
# EXAMPLE 1: Multiple choice data data.mc
#############################################################################

data(data.mc)
# estimate Rasch model for scored data.mc data
mod <- tam.mml( resp=data.mc$scored )
# estimate WLE
w1 <- tam.wle( mod )
# estimate plausible values
set.seed(789)
p1 <- tam.pv( mod , ntheta=500 , normal.approx=TRUE )$pv

# CTT results for raw data
stat1 <- tam.ctt( resp=data.mc$raw , wlescore=w1$theta , pvscores=p1[,-1] )
stat1a <- tam.ctt2( resp=data.mc$raw , wlescore=w1$theta )  # faster
stat1b <- tam.ctt2( resp=data.mc$raw )  # only frequencies
stat1c <- 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.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.ctt( resp=data.mc$raw , wlescore=w1$theta , pvscores=p1[,-1] , group=group)
stat3a <- tam.ctt2( resp=data.mc$raw , wlescore=w1$theta ,  group=group)

Run the code above in your browser using DataLab