View source: R/sdt_functions.R
fit_meta_d_MLE | R Documentation |
Provides a type-2 SDT analysis of data from a typical experiment in which observers discriminate between two response alternatives and provide ratings of confidence in their judgements.
fit_meta_d_MLE(nr_s1, nr_s2, s = 1, add_constant = TRUE)
nr_s1 |
Responses to S1 stimulus. See below for advice. |
nr_s2 |
Responses to S2 stimulus. See below for advice. |
s |
Ratio of standard deviations for the S1 and S2 stimulus. Defaults to 1. |
add_constant |
Adds a small constant to the data (1/number of possible responses) to account for 0 or 1 values. Defaults to TRUE for ease of use across multiple datasets. |
The expected input is two vectors, one for responses to each stimulus, encoding the observers response and confidence. For example, for two stimului labelled A and B, with three confidence ratings, participants could respond to stimulus A as follows:
Response: A, rating: 3, count: 60
Response: A, rating: 2, count: 30
Response: A, rating: 1, count: 10
Response: B, rating: 1, count: 7
Response: B, rating: 2, count: 4
Response: B, rating: 3, count: 1
The appropriate vector would be nr_s1 <- c(60,30,10,7,4,1)
For stimulus B, we would have the respective vector for responses to stimulus B, eg:
Response: A, rating: 3, count: 4
Response: A, rating: 2, count: 6
Response: A, rating: 1, count: 11
Response: B, rating: 1, count: 13
Response: B, rating: 2, count: 23
Response: B, rating: 3, count: 61
nr_s2 <- c(4,6,11,13,23,61)
The helper function sdt_counts
can be used to get the data into the
right format.
The output is a data frame with various metacognitive measures, including m-ratio and meta-d, estimated using Maximum Likelihood Estimation. The output will have n-1 rows, where n is the number of confidence ratings. Most measures are duplicated across rows, but some vary, as they reflect cutpoints between the confidence levels.
For more details, see Maniscalco & Lau's webpage http://www.columbia.edu/~bsm2105/type2sdt/ Please cite that page and their articles if using this command.
Maniscalco & Lau. Ported to R by Matt Craddock, matt@mattcraddock.com
Maniscalco, B., & Lau, H. (2012). A signal detection theoretic approach for estimating metacognitive sensitivity from confidence ratings. Consciousness and Cognition. http://dx.doi.org/10.1016/j.concog.2011.09.021
nr_s1 <- c(60,30,10,7,4,1)
nr_s2 <- c(4,6,11,13,23,61)
fit_meta_d_MLE(nr_s1, nr_s2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.