# NOT RUN {
### Design table:
## 8 "yes"-responses to yes-samples
## 1 "yes"-responses to no-samples
## 17 "no"-response to yes-samples
## 24 "no"-responses to no-samples
## Note that response-class is columnwise and true-class is rowwise:
(mat <- rbind(c(8, 17),
c(1, 24)))
SDT(mat, "logit")
SDT(mat, "probit")
## compare to AnotA():
m1 <- AnotA(8, 25, 1, 25)
m1
## Compute d-prime 'by hand':
## Hit rate and False alarm rates:
H <- 8/(8+17)
FA <- 1/(1+24)
zH <- qnorm(H)
zFA <- qnorm(FA)
## d-prime:
zH - zFA # d'
# }
# NOT RUN {
## Multi-response-class example (odor example from MacMillan and
## Creelman, 2005)
(odor <- matrix(c(112, 112, 72, 53, 22, 4, 7, 38, 50, 117, 101, 62), 2,
byrow = TRUE))
obj <- SDT(odor)
ROC(obj[3,3])
# }
Run the code above in your browser using DataLab