| Title: | Simulate the Multi-Attribute Search and Choice (MASC) Model |
|---|---|
| Description: | Simulates the Multi-Attribute Search and Choice (MASC) model of Gluth, Deakin and Rieskamp (2026) <doi:10.1037/rev0000614> for multi-attribute decision-making, including sequential information search, Bayesian belief updating, and choice. Beliefs may be treated as univariate (independent attributes), or multivariate over correlated attributes ('MASC-C'), in which observing one attribute updates beliefs about correlated attributes via a Kalman filter. |
| Authors: | Kiante Fernandez [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-8493-880X>) |
| Maintainer: | Kiante Fernandez <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0.9000 |
| Built: | 2026-05-28 08:14:26 UTC |
| Source: | https://github.com/kiante-fernandez/masc |
A dataset from a multi-attribute decision-making experiment examining how people search for and evaluate information when choosing between hotel options.
hotelgluth2024hotelgluth2024
hotelgluth2024A data frame with multiple rows per subject, each representing a single trial in a hotel choice experiment with three attributes:
Identifier for the dataset type, set to "hotel"
Unique identifier for each participant in the experiment
Trial number within each subject's experimental session
Value of the first attribute for the first hotel option (distance to beach)
Value of the second attribute for the first hotel option (room size)
Value of the third attribute for the first hotel option (number of stars)
Value of the first attribute for the second hotel option (distance to beach)
Value of the second attribute for the second hotel option (room size)
Value of the third attribute for the second hotel option (number of stars)
Difficulty level of the choice trial, based on the difference in option ratings
Chosen hotel option (1 or 2)
Reaction time for the choice
Weight of the first attribute (distance to beach)
Weight of the second attribute (room size)
Weight of the third attribute (number of stars)
Model parameter related to sampling noise
Model parameter related to search rule sensitivity
Model parameter related to choice threshold
This dataset captures individual decision-making processes in a hotel choice experiment. Participants were asked to choose between two hotel options described by three attributes: distance to beach, room size, and number of stars. The dataset includes both the raw choice data and estimated model parameters from the Multi-Attribute Search and Choice (MASC) model.
Gluth, S., Deakin, J., & Rieskamp, J. (2026). A theory of multiattribute search and choice. Psychological Review. doi:10.1037/rev0000614
Gluth, S., Deakin, J., & Rieskamp, J. (2026). A theory of multiattribute search and choice. Psychological Review. doi:10.1037/rev0000614
Implements the MASC model of multi-attribute decision making. This model simulates how people make decisions when comparing options with multiple attributes by sequentially sampling information about different attributes until reaching a decision.
rMASC( data = NULL, n = 1, n_options = 2, n_attributes = 3, w = NULL, sigma = 1, alpha = 3, delta = 0.01, theta = 0.01, lambda = 1, max_steps = 100, Sigma_true = NULL, Sigma_belief = NULL )rMASC( data = NULL, n = 1, n_options = 2, n_attributes = 3, w = NULL, sigma = 1, alpha = 3, delta = 0.01, theta = 0.01, lambda = 1, max_steps = 100, Sigma_true = NULL, Sigma_belief = NULL )
data |
Optional data frame containing trial-wise attribute values. Each row
represents one trial, and columns should be named following the pattern
|
n |
Integer. Number of trials to generate when data is NULL (default: 1). Ignored when data is provided. |
n_options |
Integer. Number of choice options (default: 2). |
n_attributes |
Integer. Number of attributes per option (default: 3). |
w |
Numeric vector. Attribute weights summing to 1. If NULL, weights are randomly generated from beta(3/4, 3/4) distribution (default: NULL). |
sigma |
Numeric. Standard deviation of sampling noise (default: 1). |
alpha |
Numeric. Controls how strongly fixations follow the myopic search rule. Higher values (>10) make search more deterministic, lower values (near 0) make it more random (default: 3). |
delta |
Numeric. Amount by which decision threshold increases per fixation (default: 0.01). |
theta |
Numeric. Initial decision threshold (default: 0.01). |
lambda |
Numeric. Precision of prior beliefs about attributes (default: 1). |
max_steps |
Integer. Maximum number of fixations allowed (default: 100). |
Sigma_true |
Correlation/covariance structure of the generated stimuli
(an |
Sigma_belief |
The decision maker's assumed correlation structure between
attributes (matrix or single number). This is what enables the multivariate
("MASC-C") belief update: observing one attribute spreads information to
correlated attributes via a Kalman update. |
A list containing:
results: Data frame with trial-by-trial results including:
trial: Trial number
response: Option chosen by model (1 to n_options)
best_option: Option with highest weighted value
correct: Whether response matches best_option
rt: Number of fixations taken
prop_fix_opt1, prop_fix_opt2: Proportion of fixations to each option
weights: Vector of attribute weights used
parameters: List of model parameters used (sigma, alpha, delta, theta)
raw: List containing detailed raw data for each trial. Each element corresponds to a trial and includes:
trial: Trial number
response: The option chosen by the model (1 to n_options)
best_option: The option with the highest weighted value
correct: Boolean indicating if response matches best_option
rt: Number of fixations taken to reach a decision
x: Matrix of true attribute values for all options
opt_values: Vector of computed option values (weighted sums)
weights: Vector of attribute weights used in this trial
sigma: Sampling noise parameter used
alpha: Search sensitivity parameter used
delta: Threshold increment parameter used
theta: Initial threshold parameter used
fix_sequence: Vector showing the sequence of fixations made
prop_fix_opt: Vector of proportions of fixations to each option
prop_fix_att: Vector of proportions of fixations to each attribute
Gluth, S., Deakin, J., & Rieskamp, J. (2026). A theory of multiattribute search and choice. Psychological Review. doi:10.1037/rev0000614
# Example 1: Generate 5 random trials results <- rMASC(n = 5, w = c(0.5, 0.3, 0.2)) # Example 2: Custom attribute values for multiple trials trial_data <- data.frame( # Option 1's attributes across 3 trials opt1_att1 = c(4.5, 4.2, 4.8), # Attribute 1 values opt1_att2 = c(3.2, 3.5, 3.1), # Attribute 2 values opt1_att3 = c(2.8, 2.9, 2.7), # Attribute 3 values # Option 2's attributes across 3 trials opt2_att1 = c(3.8, 3.9, 3.7), # Attribute 1 values opt2_att2 = c(4.1, 4.0, 4.2), # Attribute 2 values opt2_att3 = c(3.1, 3.3, 3.0) # Attribute 3 values ) # Run model with custom weights results <- rMASC( data = trial_data, w = c(0.5, 0.3, 0.2) # weights for attributes ) # Example 3: Correlated attributes (MASC-C). The decision maker exploits a # positive correlation structure, so observing one attribute informs beliefs # about the others ("belief spread"). results <- rMASC( n = 20, w = c(0.5, 0.3, 0.2), Sigma_true = 0.6, # stimuli are positively correlated Sigma_belief = 0.6 # matched beliefs (use 0 for the original MASC model) )# Example 1: Generate 5 random trials results <- rMASC(n = 5, w = c(0.5, 0.3, 0.2)) # Example 2: Custom attribute values for multiple trials trial_data <- data.frame( # Option 1's attributes across 3 trials opt1_att1 = c(4.5, 4.2, 4.8), # Attribute 1 values opt1_att2 = c(3.2, 3.5, 3.1), # Attribute 2 values opt1_att3 = c(2.8, 2.9, 2.7), # Attribute 3 values # Option 2's attributes across 3 trials opt2_att1 = c(3.8, 3.9, 3.7), # Attribute 1 values opt2_att2 = c(4.1, 4.0, 4.2), # Attribute 2 values opt2_att3 = c(3.1, 3.3, 3.0) # Attribute 3 values ) # Run model with custom weights results <- rMASC( data = trial_data, w = c(0.5, 0.3, 0.2) # weights for attributes ) # Example 3: Correlated attributes (MASC-C). The decision maker exploits a # positive correlation structure, so observing one attribute informs beliefs # about the others ("belief spread"). results <- rMASC( n = 20, w = c(0.5, 0.3, 0.2), Sigma_true = 0.6, # stimuli are positively correlated Sigma_belief = 0.6 # matched beliefs (use 0 for the original MASC model) )