| hlaoModel | R Documentation |
'hlaoModel' recovers list-based reach probabilities and prefix masses on a suffix-closed menu domain. It evaluates recovered-attention restrictions, constructs sharp independent, dependence-robust, or path-independence-robust preference polytopes, and computes sharp bounds for supplied preference events. The first two modes require a suffix-closed domain because they use Sequential Path Independence to recover attention. The '"noPI"' mode treats prefix masses as latent and is available on any observed-menu domain. With full menu data and positive terminal reach, the SPI modes also recover the full-attention choice rule and report Block–Marschak diagnostics. Optional agreement targets measure whether observed and full-attention choices agree. Under benchmark independence, structured events support status-checked column generation with mixed-integer pricing over linear orders. Returned diagnostics report solver statuses, tolerance, reduced costs, primal and dual residuals, an optimality-gap bound, and whether the numerical certificate checks succeeded.
hlaoModel(
menu,
prob,
outside_prob = NULL,
list_order = NULL,
events = NULL,
dependence = c("independent", "robust", "noPI", "both", "all"),
tolerance = sqrt(.Machine$double.eps),
agreement = FALSE,
algorithm = c("auto", "enumerate", "column_generation"),
max_rankings = 5000L,
max_iterations = 1000L
)
menu |
Numeric matrix of zeros and ones with one row per distinct menu. |
prob |
Numeric matrix of inside choice probabilities with the same dimensions as 'menu'. |
outside_prob |
Optional vector of outside-option probabilities. When omitted, it is computed as one minus the row sum of 'prob'. |
list_order |
Permutation giving the observed presentation order. The default is the column order of 'menu'. |
events |
Optional zero-one event indicators over the rows returned by [hlaoRankings()], or one or more structured [hlaoEvent()] objects. |
dependence |
Which population polytope to construct: '"independent"', '"robust"', '"noPI"', '"both"', or '"all"'. For backward compatibility, '"both"' continues to request the independent and dependence-robust SPI polytopes; '"all"' adds the no-SPI polytope. |
tolerance |
Nonnegative numerical tolerance for model diagnostics. |
agreement |
'FALSE', 'TRUE', or observed-menu indices. 'TRUE' computes full-attention agreement bounds for every observed menu. |
algorithm |
Computational method: '"auto"', '"enumerate"', or '"column_generation"'. Column generation currently applies to the benchmark independent model and structured events. |
max_rankings |
Maximum number of ranking columns to enumerate. |
max_iterations |
Maximum number of master and pricing iterations under column generation. |
An object of class 'ramchoiceHLAOModel' containing recovered 'attention', attention 'diagnostics', population 'pairwise' shares, compatibility by dependence mode, event 'bounds', full-attention 'agreement', ranking columns used by the selected algorithm, computation diagnostics, and, when available, 'full_attention' and 'block_marschak' results.
M. D. Cattaneo, P. H. Y. Cheung, X. Ma, and Y. Masatlioglu (2026). Attention Overload. Working paper.
menu <- rbind(c(1, 0), c(0, 1), c(1, 1))
prob <- rbind(c(.8, 0), c(0, .75), c(.56, .24))
rankings <- hlaoRankings(1:2)
event <- rankings[, 1] == 2
hlaoModel(menu, prob, events = list(`2 above 1` = event))
hlaoModel(
menu, prob,
events = hlaoEvent(2, 1, name = "2 above 1"),
agreement = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.