Structs

SignalDetectionModels.SDTType
SDT{T <: Real} <: AbstractSDT

Fields

  • d::T: discriminability
  • c::T: criterion relative optimal value
  • σₛ::T: standard deviation of noise distribution
  • nₙ::Int: number of noise trials
  • nₛ::Int: number of signal trials

Constructors

SDT(; d, c, σₛ = 1.0, nₙ, nₛ = nₙ)

SDT(d, c, σₛ, nₙ, nₛ)

References

Stanislaw, H., & Todorov, N. (1999). Calculation of signal detection theory measures. Behavior Research Methods, Instruments, & Computers, 31(1), 137-149.

source

Functions

SignalDetectionModels.compute_cFunction
compute_c(model::AbstractSDT)

Computes criterion c.

Arguments

  • model::AbstractSDT: abstract signal detection theory model

Example

using SignalDetectionModels
model = SDT(; d = 2.0, c = 0.0, nₙ = 100)
data = compute_c(model)
source
compute_c(hr::Real, far::Real, σₛ = 1.0)

Computes criterion c.

Arguments

  • hr::Real: hit rate
  • far::Real: false alarm rate
  • σₛ = 1.0: standard deviation of the signal distribution

Example

using SignalDetectionModels
hr = .90
far = .05
compute_c(hr, far)
source
SignalDetectionModels.compute_dFunction
compute_d(model::AbstractSDT)

Computes discriminability d.

Arguments

  • model::AbstractSDT: abstract signal detection theory model
source
compute_d(hr::Real, far::Real, σₛ = 1.0)

Computes discriminability d.

Arguments

  • hr::Real: hit rate
  • far::Real: false alarm rate
  • σₛ = 1.0: standard deviation of the signal distribution

Example

using SignalDetectionModels
hr = .90
far = .05
compute_d(hr, far)
source
Distributions.logpdfFunction
logpdf(model::AbstractSDT, data::Vector{Int})

Compute log likelihood of data based on signal detection theory model.

Arguments

  • model::AbstractSDT: abstract signal detection theory model
  • data::Vector{Int}: data vector containing the hit count and false alarm count

Example

using SignalDetectionModels
model = SDT(; d = 2.0, c = 0.0, nₙ = 100)
data = rand(model)
LL = logpdf(model, data)
source
Base.randFunction
rand(model::AbstractSDT)

Generates simulated data from model.

Arguments

  • model::AbstractSDT: abstract signal detection theory model

Returns

  • data::Vector{Int}: data vector containing the hit count and false alarm count

Example

using SignalDetectionModels
model = SDT(; d = 2.0, c = 0.0, nₙ = 100)
data = rand(model)
source

Plotting

SignalDetectionModels.plot_distributionsFunction
plot_distributions(
    model::AbstractSDT;
    far_color = RGB(99/255, 144/255, 166/255),
    hr_color = RGB(67 / 255, 97 / 255, 112 / 255),
    config...
)

Generates a plot of a noise and signal distribution with the criterion represented as a vertical line.

Arguments

  • model::AbstractSDT: an abstract signal detection theory model

Keywords

  • far_color = RGB(99/255, 144/255, 166/255): the color of the false alarm rate of the noise distribution
  • hr_color = RGB(67 / 255, 97 / 255, 112 / 255): the color of hit rate area of the signal distribution
  • config...: optional keyword arguments to configure plot

Example

using SignalDetectionModels
model = SDT(; d = 2.0, c = .50, σₛ = 1.5, nₙ = 100)
plot_distributions(model)
source
SignalDetectionModels.plot_iso_biasFunction
plot_iso_bias(model::AbstractSDT; config...)

Generates a plot of bias ('c') as a function of false alarm rate and hit rate.

Arguments

  • model::AbstractSDT: an abstract signal detection theory model

Keywords

  • config...: optional keyword arguments to configure plot

Example

using SignalDetectionModels
model = SDT(; d = 2.0, c = .50, σₛ = 1.5, nₙ = 100)
plot_iso_bias(model)
source
SignalDetectionModels.plot_iso_sensitivityFunction
plot_iso_sensitivity(model::AbstractSDT; config...)

Generates a plot of sensitivity ('d') as a function of false alarm rate and hit rate.

Arguments

  • model::AbstractSDT: an abstract signal detection theory model

Keywords

  • config...: optional keyword arguments to configure plot

Example

using SignalDetectionModels
model = SDT(; d = 2.0, c = .50, σₛ = 1.5, nₙ = 100)
plot_iso_sensitivity(model)
source
SignalDetectionModels.plot_ROCFunction
plot_ROC(model::AbstractSDT; config...)

Generates a plot of the receiver operating characteristic (ROC).

Arguments

  • model::AbstractSDT: an abstract signal detection theory model

Keywords

  • config...: optional keyword arguments to configure plot

Example

using SignalDetectionModels
model = SDT(; d = 2.0, c = .50, σₛ = 1.5, nₙ = 100)
plot_ROC(model)
source
SignalDetectionModels.plot_zROCFunction
plot_zROC(model::AbstractSDT; config...)

Generates a plot of the z-receiver operating characteristic (zROC).

Arguments

  • model::AbstractSDT: an abstract signal detection theory model

Keywords

  • config...: optional keyword arguments to configure plot

Example

using SignalDetectionModels
model = SDT(; d = 2.0, c = .50, σₛ = 1.5, nₙ = 100)
plot_zROC(model)
source