Internal function to prepare data structures for TMB hurdle model fitting. Converts subject IDs to 0-indexed integers and creates derived variables.
.hurdle_prepare_data(data, y_var, x_var, id_var)A list containing:
Numeric vector of prices
Numeric vector of consumption values
Integer vector (1 if consumption == 0, else 0)
Log consumption (0 for zeros)
0-indexed subject IDs for C++
Unique subject IDs (original)
Number of unique subjects
A validated data frame.
Character string, name of consumption variable.
Character string, name of price variable.
Character string, name of subject ID variable.