This function creates two matrices from an input data frame by pivoting the data into a wide format: one matrix for utilities and another for probabilities.
Arguments
- data
A data frame containing the data.
- id
A character string indicating the column name for the unique identifier.
- attribute
A character string indicating the column name for the attribute.
- utilities
A character string specifying the column name for the utility values.
- probability
A character string specifying the column name for the probability values.
- weights
A character string specifying the column name for weights. By default (NULL) it sets weights as 1.