Description Usage Format Details References Examples
Responses and response time data from the Amsterdam Chess Test (ACT).
1 |
A dataframe with 259 rows and 81 variables.
Variables:
ELO: Standardized ELO rating (numeric)
Y1-Y40: item correct score (1 or 0) for scored items 1 – 40 (numeric)
RT1-RT40: response time (seconds) for scored items 1 – 40 (numeric)
Three components of chess expertise are measured:
Tactical skill (20 items): item 1-20
Positional skill (10 items): item 21-30
End-game skill (10 items): item 31-40
van der Maas, H. L., & Wagenmakers, E. J. (2005). A psychometric analysis of chess expertise. The American journal of psychology, 118(1), 29-60. (PubMed)
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | ## Not run:
###
### EXAMPLE APPLICATION AMSTERDAM CHESS DATA van der Maas and Wagenmakers (2005).
###
library(LNIRT)
data(AmsterdamChess)
head(AmsterdamChess)
N <- nrow(AmsterdamChess)
Y <-as.matrix(AmsterdamChess[c(which(colnames(AmsterdamChess)=="Y1")
:which(colnames(AmsterdamChess)=="Y40"))])
K <- ncol(Y)
## replace missing 9 with NA
Y[Y==9] <- NA
## Test takers with NAs
## Y[147,]
## Y[201,]
## Y[209,]
RT <- as.matrix(AmsterdamChess[c(which(colnames(AmsterdamChess)=="RT1")
:which(colnames(AmsterdamChess)=="RT40"))])
## replace missing 10000.000 with NA
RT[RT==10000.000] <- NA
RT<-log(RT) #logarithm of RTs
# Define Time Scale
X <- 1:K
X <- (X - 1)/K
set.seed(12345) ## used to obtain the results reported in the paper ##
outchess <- LNIRTQ(Y=Y,RT=RT,X=X,XG=10000)
summary(outchess)
## Check MCMC convergence
##
## check several MCMC chains
##
library(mcmcse)
ess(outchess1$MAB[1001:10000,1,1]) ## effective sample size
mcse(outchess1$MAB[1001:10000,1,1], size = 100
, g = NULL,method = "bm", warn = FALSE) #standard error
ess(outchess$MAB[1001:10000,1,2]) ## effective sample size
mcse(outchess$MAB[1001:10000,1,2], size = 100
, g = NULL,method = "bm", warn = FALSE) #standard error
ess(outchess$MAB[1001:10000,1,3]) ## effective sample size
mcse(outchess$MAB[1001:10000,1,3], size = 100
, g = NULL,method = "bm", warn = FALSE) #standard error
ess(outchess$MAB[1001:10000,1,4]) ## effective sample size
mcse(outchess$MAB[1001:10000,1,4], size = 100
, g = NULL,method = "bm", warn = FALSE) #standard error
ess(outchess$MSP[1001:10000,1,4]) ## effective sample size
mcse(outchess$MSP[1001:10000,1,4], size = 100
, g = NULL,method = "bm", warn = FALSE) #standard error
ess(outchess$MSI[1001:10000,1,4]) ## effective sample size
mcse(outchess$MSI[1001:10000,1,4], size = 100
, g = NULL,method = "bm", warn = FALSE) #standard error
## Convergence Checks
library(coda)
summary(as.mcmc(outchess$MAB[1001:10000,1,1]))
summary(as.mcmc(outchess$MAB[1001:10000,1,4]))
summary(as.mcmc(outchess$MSI[1001:10000,1,1]))
summary(as.mcmc(outchess$MSI[1001:10000,1,4]))
summary(as.mcmc(outchess$MSP[1001:10000,1,4]))
summary(as.mcmc(outchess$MSP[1001:10000,1,1]))
## check some chains on convergence
geweke.diag(as.mcmc(outchess$MAB[1001:10000,1,1]), frac1=0.1, frac2=0.5)
geweke.plot(as.mcmc(outchess$MAB[1001:10000,1,1]), frac1=0.1, frac2=0.5)
heidel.diag(as.mcmc(outchess$MAB[1001:10000,1,1]), eps=0.1, pvalue=0.05)
geweke.diag(as.mcmc(outchess$MSI[1001:10000,1,1]), frac1=0.1, frac2=0.5)
geweke.plot(as.mcmc(outchess$MSI[1001:10000,1,1]), frac1=0.1, frac2=0.5)
heidel.diag(as.mcmc(outchess$MSI[1001:10000,1,1]), eps=0.1, pvalue=0.05)
geweke.diag(as.mcmc(outchess$MSP[1001:10000,3,3]), frac1=0.1, frac2=0.5)
geweke.plot(as.mcmc(outchess$MSP[1001:10000,3,3]), frac1=0.1, frac2=0.5)
heidel.diag(as.mcmc(outchess$MSP[1001:10000,3,3]), eps=0.1, pvalue=0.05)
## complete missing data
outchess$Mtheta[147,]
######################################################################
### THIS PART IS NOT DISCUSSED IN THE PAPER ###
######################################################################
# PLOT PERSON PARAMETERS
# ABILITY VS SPEED
par(mar=c(5, 5, 2,4), xpd=F)
layout(matrix(c(1,2,3,4), 2, 2, byrow = TRUE), widths=c(2,2), heights=c(2,2))
plot(outchess$Mtheta[,1],outchess$Mtheta[,2]
,xlab=expression(paste("Ability"~~(theta)))
,ylab=expression(paste("Intercept"~~(zeta[0]))),
xlim=c(-2,2),ylim=c(-1,1),bty="l",cex.lab=1.5,cex.axis=1.25)
abline(lm(outchess$Mtheta[,2]~outchess$Mtheta[,1]))
abline(h = 0,lty = 2)
plot(outchess$Mtheta[,1],outchess$Mtheta[,3]
,xlab=expression(paste("Ability"~~(theta)))
,ylab=expression(paste("Linear slope"~~(zeta[1]))),
xlim=c(-2,2),ylim=c(-1,1),bty="l",cex.lab=1.5,cex.axis=1.25)
abline(lm(outchess$Mtheta[,3]~outchess$Mtheta[,1]))
abline(h = 0,lty = 2)
plot(outchess$Mtheta[,1],outchess$Mtheta[,4]
,xlab=expression(paste("Ability"~~(theta)))
,ylab=expression(paste("Quadratic slope"~~(zeta[2]))),
xlim=c(-2,2),ylim=c(-1,1),bty="l",cex.lab=1.5,cex.axis=1.25)
abline(lm(outchess$Mtheta[,4]~outchess$Mtheta[,1]))
abline(h = 0,lty = 2)
plot(outchess$Mtheta[,3],outchess$Mtheta[,4]
,xlab=expression(paste("Linear slope"~~(zeta[1])))
,ylab=expression("Quadratic slope"~~paste((zeta[2]))),
xlim=c(-0.5,1),ylim=c(-0.5,0.5),bty="l",cex.lab=1.5,cex.axis=1.25)
abline(lm(outchess$Mtheta[,4]~outchess$Mtheta[,3]))
abline(h = 0,lty = 2)
### include residual analysis ###
set.seed(12345)
outchessr <- LNIRTQ(Y=Y,RT=RT,X=X,XG=10000,burnin=10,XGresid=1000,resid=TRUE)
summary(outchessr)
## plot of person-fit scores for RT patterns
plot(outchessr$lZPT,outchessr$lZP)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.