SDT | R Documentation |

The function computes d-prime for any 2 x J table where J >= 2 for the "yesâ€“no" or "A-Not A" experiment using the Signal Detection Theory (SDT) algorithm to compute J-1 d-prime's. The algorithm is also called the "empirical probit transform". The function also provides the "logit" counterpart.

```
SDT(tab, method = c("probit", "logit"))
```

`tab` |
A 2 x J table with true class relation in rows (only two true classes) and the J-class response in columns |

`method` |
should the empirical probit or logit transform be computed? |

A (J-1) x 3 matrix. The first two columns contains the z-transform of the Hit rate and the False Alarm rate respectivelyâ€”ready to plot along with the empirical ROC curve. The third column contains the estimated d-primes.

Rune Haubo B Christensen

MacMillan , A. N. and Creelman, C. D (2005) Detection Theory A User's Guide. Lawrence Elbaum Associates, Inc. 2nd edition.

```
### 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'
## 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])
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.