format4to2 {sdtalt} | R Documentation |
Changes data in the form of hits, false alarms, misses, and correct rejections (which is suitable for the sdt function) for each individual into a file with one trial per line suitable for mlmsdt. See Wright, Horry and Skagerberg (in press, Behavior Research Methods).
format4to2(x, cnames = c("subno", "isold", "saysold"), code = 0.5, ...)
x |
dataframe with subject number, hits, false alarms, misses, and CR |
cnames |
names to output |
code |
code for isold and saysold |
... |
other parameters passed |
code - default is -.5 for new and +.5 for old for isold. Put 1 in for 0 and 1. saysold is 0 and 1
A three column dataframe with length equal the number of trials is produced.
Daniel B. Wright
Wright, D.B., Horry, R., & Skagerberg, E.M. (in press). Functions for traditional and multilevel approaches to signal detection theory. Behavior Research Methods.
format4 <- rbinom(100,25,.5) dim(format4) <- c(25,4) format4 <- cbind(1:25,format4) dim(format4) format4[1:5,] format2 <- format4to2(format4) dim(format2) format2[1:5,]