hlaoTest: Inference for Heterogeneous List-Based Attention Overload

View source: R/hlao.R

hlaoTestR Documentation

Inference for Heterogeneous List-Based Attention Overload

Description

'hlaoTest' forms simultaneous bands for all observed menu–outcome probabilities. The default Hoeffding method is finite-sample valid. The correlated-Gaussian method uses the estimated block-multinomial covariance and retains exact binomial bands for sparse or degenerate cells. When 'cluster' is supplied, the Gaussian component instead uses cluster-level influence vectors and multiplier draws, and the fallback is a cluster-Hoeffding band. When both types of cells are present, each component receives half of the common error budget. The function inverts the undivided binary-menu moments to obtain simultaneous pairwise preference-share intervals that remain valid at zero reach. It also reports a Bonferroni-calibrated studentized inversion of the same moments. The studentized set is obtained by exact quadratic inversion and may therefore contain more than one component; exactly degenerate moments return '[0,1]'. For supplied general preference events, the function also computes the dependence-robust outer projection intervals described in the Supplemental Appendix.

Usage

hlaoTest(
  menu,
  choice,
  outside = NULL,
  list_order = NULL,
  events = NULL,
  alpha = 0.05,
  band_method = c("hoeffding", "gaussian"),
  diagnostic_method = c("outer", "delta"),
  n_band_draws = 2000L,
  boundary_count = 5L,
  tolerance = sqrt(.Machine$double.eps),
  max_rankings = 5000L,
  cluster = NULL
)

Arguments

menu

Zero-one matrix of menus, with one row per observation.

choice

Zero-one matrix of inside choices. An all-zero row denotes the outside option unless 'outside' is supplied.

outside

Optional zero-one indicator for outside choices.

list_order

Permutation giving the observed presentation order.

events

Optional zero-one event indicators over [hlaoRankings()].

alpha

Nominal error probability for the common simultaneous region.

band_method

Probability-band method, either '"hoeffding"' or '"gaussian"'.

diagnostic_method

Specification-diagnostic method. '"outer"' uses the simultaneous probability region and is the finite-sample default. '"delta"' uses a direct delta-Gaussian approximation on a complete menu domain with positive terminal reach.

n_band_draws

Number of Gaussian or cluster-multiplier draws used for the simultaneous band and direct-diagnostic critical values.

boundary_count

Minimum number of successes and failures required for a cell to use the Gaussian band. Under clustered sampling this counts clusters with successes and failures. Other cells retain the applicable simultaneous fallback band.

tolerance

Nonnegative numerical tolerance for zero-reach conventions.

max_rankings

Maximum ranking count used for general-event projection.

cluster

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

Value

An object of class 'ramchoiceHLAOTest' containing aggregated choice 'summary', plug-in 'attention' and 'full_attention' estimates, simultaneous probability 'bands', weak-reach 'pairwise' intervals, studentized 'pairwise_studentized' sets and their 'pairwise_studentized_components', optional general-event 'event_intervals', simultaneous specification diagnostics, projection dimensions, options, and elapsed time.

References

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

Examples

menu <- rbind(
  matrix(rep(c(1, 0), 10), ncol = 2, byrow = TRUE),
  matrix(rep(c(0, 1), 10), ncol = 2, byrow = TRUE),
  matrix(rep(c(1, 1), 10), ncol = 2, byrow = TRUE)
)
choice <- matrix(0, nrow = nrow(menu), ncol = 2)
choice[1:8, 1] <- 1
choice[11:17, 2] <- 1
choice[21:26, 1] <- 1
choice[27:28, 2] <- 1
hlaoTest(menu, choice)


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