metasdt

A simple R package for calculating (meta-) SDT measures

https://github.com/craddm/metasdt

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A simple R package for calculating (meta-) SDT measures

Basic Info
  • Host: GitHub
  • Owner: craddm
  • License: other
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 122 KB
Statistics
  • Stars: 16
  • Watchers: 2
  • Forks: 3
  • Open Issues: 4
  • Releases: 1
Created over 8 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation Codemeta

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# metaSDT


[![R-CMD-check](https://github.com/craddm/metaSDT/workflows/R-CMD-check/badge.svg)](https://github.com/craddm/metaSDT/actions)
[![DOI](https://zenodo.org/badge/99712128.svg)](https://zenodo.org/badge/latestdoi/99712128)
[![R-CMD-check](https://github.com/craddm/metaSDT/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/craddm/metaSDT/actions/workflows/R-CMD-check.yaml)


This is an R implementation of Maniscalco and Lau's methods of calculating metacognitive SDT measures using maximum likelihood estimation and minimization of the sum of squared errors.

## Installation


You can install `metaSDT`'s development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("craddm/metaSDT")
```

For further details on metacognitive/Type 2 SDT, see their website at http://www.columbia.edu/~bsm2105/type2sdt/ and the following publications:

Maniscalco, B., & Lau, H. (2012). A signal detection theoretic approach for estimating metacognitive sensitivity from confidence ratings. Consciousness and Cognition, 21(1), 422–430. doi:10.1016/j.concog.2011.09.021

Maniscalco, B., & Lau, H. (2014). Signal detection theory analysis of type 1 and type 2 data: meta-d’, response-specific meta-d’, and the unequal variance SDT mode. In S. M. Fleming & C. D. Frith (Eds.), The Cognitive Neuroscience of Metacognition (pp.25-66). Springer.

If you use these functions, cite the above papers and scripts on which it is based.

The `fit_meta_d_SSE` and `fit_meta_d_MLE` commands require data in the same format outlined on M & L's webpage, as follows:

Suppose there are two stimuli, A, and B, and three confidence ratings - high (3), medium(2), and low(1). The possible responses are

A3, A2, A1, B1, B2, B3.

Input to the function should be counts for each of these responses separately for each stimulus type.

So for example:

```{r}
library(metaSDT)
nR_S1 <- c(100, 50, 30, 20, 10, 4)
nR_S2 <- c(4, 20, 21, 35, 60, 90)
fit_MLE <- fit_meta_d_MLE(nR_S1,
                          nR_S2)
fit_MLE
fit_SSE <- fit_meta_d_SSE(nR_S1,
                          nR_S2)
fit_SSE
```

Output is a data frame with m-ratio etc.

Owner

  • Name: Matt Craddock
  • Login: craddm
  • Kind: user
  • Location: Lincoln/London, UK
  • Company: The Alan Turing Institute

Research Software Engineer

Citation (CITATION.cff)

# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v0.2.3
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------
 
cff-version: 1.2.0
message: 'To cite package "metaSDT" in publications use:'
type: software
license: MIT
title: 'metaSDT: Calculate Type 1 and Type 2 Signal Detection Measures'
version: 0.6.0
abstract: Type 1 and Type 2 signal detection measures for simple 2AFC tasks.
authors:
- family-names: Craddock
  given-names: Matt
  email: matt@mattcraddock.com
preferred-citation:
  type: manual
  title: 'metaSDT: Calculate Type 1 and Type 2 Signal Detection Measures'
  authors:
  - family-names: Craddock
    given-names: Matt
    email: matt@mattcraddock.com
  version: 0.6.0
  abstract: Type 1 and Type 2 signal detection measures for simple 2AFC tasks.
  repository-code: https://github.com/craddm/metaSDT
  url: https://github.com/craddm/metaSDT
  date-released: '2021-08-30'
  contact:
  - family-names: Craddock
    given-names: Matt
    email: matt@mattcraddock.com
  license: MIT
  year: '2021'
repository-code: https://github.com/craddm/metaSDT
url: https://github.com/craddm/metaSDT
date-released: '2021-08-30'
contact:
- family-names: Craddock
  given-names: Matt
  email: matt@mattcraddock.com
references:
- type: software
  title: dplyr
  abstract: 'dplyr: A Grammar of Data Manipulation'
  notes: Imports
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@rstudio.com
    orcid: https://orcid.org/0000-0003-4757-117X
  - family-names: François
    given-names: Romain
    orcid: https://orcid.org/0000-0002-2444-4226
  - family-names: Henry
    given-names: Lionel
  - family-names: Müller
    given-names: Kirill
    orcid: https://orcid.org/0000-0002-1416-3412
  year: '2022'
  url: https://CRAN.R-project.org/package=dplyr
- type: software
  title: tidyr
  abstract: 'tidyr: Tidy Messy Data'
  notes: Imports
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@rstudio.com
  - family-names: Girlich
    given-names: Maximilian
  year: '2022'
  url: https://CRAN.R-project.org/package=tidyr
- type: software
  title: rlang
  abstract: 'rlang: Functions for Base Types and Core R and ''Tidyverse'' Features'
  notes: Imports
  authors:
  - family-names: Henry
    given-names: Lionel
    email: lionel@rstudio.com
  - family-names: Wickham
    given-names: Hadley
    email: hadley@rstudio.com
  year: '2022'
  url: https://CRAN.R-project.org/package=rlang
- type: software
  title: nleqslv
  abstract: 'nleqslv: Solve Systems of Nonlinear Equations'
  notes: Imports
  authors:
  - family-names: Hasselman
    given-names: Berend
  year: '2022'
  url: https://CRAN.R-project.org/package=nleqslv
- type: software
  title: purrr
  abstract: 'purrr: Functional Programming Tools'
  notes: Imports
  authors:
  - family-names: Henry
    given-names: Lionel
    email: lionel@rstudio.com
  - family-names: Wickham
    given-names: Hadley
    email: hadley@rstudio.com
  year: '2022'
  url: https://CRAN.R-project.org/package=purrr
- type: software
  title: testthat
  abstract: 'testthat: Unit Testing for R'
  notes: Suggests
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@rstudio.com
  year: '2022'
  url: https://CRAN.R-project.org/package=testthat

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "metaSDT",
  "description": "Type 1 and Type 2 signal detection measures for simple 2AFC tasks.",
  "name": "metaSDT: Calculate Type 1 and Type 2 Signal Detection Measures",
  "codeRepository": "https://github.com/craddm/metaSDT",
  "issueTracker": "https://github.com/craddm/metaSDT/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.6.0",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.2.1 (2022-06-23)",
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Matt",
      "familyName": "Craddock",
      "email": "matt@mattcraddock.com"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "tidyr",
      "name": "tidyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyr"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "rlang",
      "name": "rlang",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rlang"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "nleqslv",
      "name": "nleqslv",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=nleqslv"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "purrr",
      "name": "purrr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=purrr"
    },
    "SystemRequirements": null
  },
  "fileSize": "51.274KB",
  "readme": "https://github.com/craddm/metaSDT/blob/main/README.md",
  "contIntegration": "https://github.com/craddm/metaSDT/actions"
}

GitHub Events

Total
  • Watch event: 4
  • Fork event: 2
Last Year
  • Watch event: 4
  • Fork event: 2

Dependencies

DESCRIPTION cran
  • dplyr * imports
  • nleqslv * imports
  • purrr * imports
  • rlang * imports
  • tidyr * imports
  • testthat * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite