## Not run:
# #############################################################################
# # 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)
# ## End(Not run)
Run the code above in your browser using DataLab