View source: R/sdt_functions.R
fit_meta_d_SSE | 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_SSE(
nr_s1,
nr_s2,
s = 1,
d_min = -5,
d_max = 5,
d_grain = 0.01,
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. |
d_min |
Minimum bound for d' |
d_max |
Maximum bound for d' |
d_grain |
Resolution of grid of possible parameters between the bounds. |
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. |
Where fit_meta_d_MLE
uses Maximum Likelihood Estimation,
fit_meta_d_SSE
works by finding the minimum sum of squared errors. As
with the MLE method, input is expected as counts for each of two stimulus
types.
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 output is a dataframe with various metacognitive measures, including m-ratio and meta-d, estimated through minimization of SSE.
Currently, multiple rows will be returned when there are more than 2 confidence ratings, with some values varying, as they represent cutpoints between confidence ratings, and others simply duplicated.
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
Other [meta_d]:
fit_meta_d_bal()
nr_s1 <- c(60,30,10,7,4,1)
nr_s2 <- c(4,6,11,13,23,61)
fit_meta_d_SSE(nr_s1, nr_s2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.