compare_max_sdt: Compare Two Nested MAX SDT Models

View source: R/max_sdt_fit.R

compare_max_sdtR Documentation

Compare Two Nested MAX SDT Models

Description

Performs a chi-squared difference test comparing a less constrained (free) MAX SDT model to a more constrained (nested) model. Both models must be fitted to the same data.

Usage

compare_max_sdt(free, constrained)

Arguments

free

A "max_sdt_fit" object: the less constrained model.

constrained

A "max_sdt_fit" object: the more constrained model. Must have fewer free parameters than free.

Details

The chi-squared difference statistic is:

\Delta\chi^2 = \chi^2_{\text{constrained}} - \chi^2_{\text{free}}

with degrees of freedom equal to the difference in the number of free parameters. A significant result indicates that the constraint worsens fit. The fits must use identical counts and lineup sizes, must have converged, and the constrained model must impose every constraint in the free model plus at least one additional constraint.

Value

An object of class "max_sdt_compare" with the test result.

See Also

fit_max_sdt

Examples


# Each two-condition fit takes a few seconds
fit_free <- fit_max_sdt(
  n_hit=69, n_tp_choose=82, n_fa=64, N_tp=96, N_ta=106,
  n_hit_2=68, n_tp_choose_2=78, n_fa_2=42, N_tp_2=96, N_ta_2=96
)
fit_eqd <- fit_max_sdt(
  n_hit=69, n_tp_choose=82, n_fa=64, N_tp=96, N_ta=106,
  n_hit_2=68, n_tp_choose_2=78, n_fa_2=42, N_tp_2=96, N_ta_2=96,
  constrain_d = TRUE
)
compare_max_sdt(fit_free, fit_eqd)


r4lineups documentation built on Nov. 10, 2026, 1:08 a.m.