aomTest: Sample Inference for the Homogeneous Attention Overload Model

View source: R/aom.R

aomTestR Documentation

Sample Inference for the Homogeneous Attention Overload Model

Description

'aomTest' tests candidate preference orderings under the homogeneous AOM and returns a tidy inference table. Row-i.i.d. calculations delegate to [revealPref()] with AOM restrictions only. When 'cluster' is supplied, the function uses cluster-level influence vectors and multiplier critical values while preserving the legacy result for backward-compatible auditing.

Usage

aomTest(
  menu,
  choice,
  pref_list = NULL,
  method = "GMS",
  alpha = 0.05,
  nCritSimu = 2000,
  BARatio2MS = 0.1,
  BARatio2UB = 0.1,
  MNRatioGMS = NULL,
  attBinary = 1,
  cluster = NULL
)

Arguments

menu

Numeric matrix of zeros and ones containing observed menus.

choice

Numeric matrix of zeros and ones containing observed choices.

pref_list

Numeric matrix whose rows are candidate strict preference orderings. The default is '1, 2, ...'.

method

Critical-value method: '"GMS"', '"PI"', '"LF"', '"2MS"', '"2UB"', or '"ALL"'.

alpha

One or more nominal test levels chosen from '0.10', '0.05', and '0.01'.

nCritSimu

Number of Gaussian or cluster-multiplier simulations used for critical values.

BARatio2MS

Beta-to-alpha ratio for two-step moment selection.

BARatio2UB

Beta-to-alpha ratio for the two-step upper-bound method.

MNRatioGMS

Generalized moment-selection tuning parameter. 'NULL' uses '1/log(N)', where 'N' is the total sample size under row-i.i.d. sampling and the number of clusters under clustered sampling.

attBinary

Numeric value between one half and one. Values below one impose the attentive-at-binaries restriction used by the legacy API.

cluster

Optional vector identifying independent sampling clusters. When supplied, covariance estimation and Gaussian critical values use cluster-level influence vectors and multiplier draws.

Value

An object of class 'ramchoiceAOMTest'. Its 'results' component has one row per preference, method, and nominal level. The object also contains 'preferences', candidate-specific 'inequalities', menu-level 'summary' estimates, 'constraints', inference 'options', elapsed computation time, and the complete legacy [revealPref()] result.

References

M. D. Cattaneo, P. H. Y. Cheung, X. Ma, and Y. Masatlioglu (2026). Attention Overload. Working paper.

Examples

set.seed(42)
simulated <- lapply(4:2, function(size) {
  logitSimu(n = 10, uSize = 4, mSize = size, a = 2)
})
menu <- do.call(rbind, lapply(simulated, `[[`, "menu"))
choice <- do.call(rbind, lapply(simulated, `[[`, "choice"))
aomTest(
  menu,
  choice,
  pref_list = rbind(1:4, 4:1),
  nCritSimu = 100
)


ramchoice documentation built on Sept. 4, 2026, 9:07 a.m.