Structure a dataset with four choice sets and three options for each choice set
Posted: 17 Mar 2021, 20:10
Dear all,
I would like to analyze a dataset using the mixed logit model (based on Apollo_example_14). The dataset is a survey dataset and each respondent was presented with four choice sets (1,2,3, and 4). For each choice set, there are three options (option A, option B, and status quo). And there are four variables (coverage, accurancy1, accurancy2, and bid) for each option.
After transforming the dataset to the wide-format based on choice set and option, we have many variables. For example, coverage will be converted into cov_1_1, cov_1_2, cov_1_3, cov_2_1, cov_2_2, cov_2_3, cov_3_1, cov_3_2, cov_3_3, cov_4_1, cov_4_2, cov_4_3, and so on so forth. The first number indicates the choice set and the second number indicates the option.
Based on Apollo_example_14, I define the following model and likelihood function:
V1= (b_cov_1*cov_1_1 + b_cov_1*cov_1_2 + b_cov_1*cov_1_3) + (b_acc1_1*acc1_1_1 + b_acc1_1*acc1_1_2 + b_acc1_1*acc1_1_3)
+ (b_acc2_1*acc2_1_1 + b_acc2_1*acc2_1_2 + b_acc2_1*acc2_1_3) + (b_bid_1 * bid_1_1 * b_bid_1 * bid_1_2 + b_bid_1 * bid_1_3)
Similarly,
V4= (b_cov_4*cov_4_1 + b_cov_4*cov_4_2 + b_cov_4*cov_4_3) + (b_acc1_4*acc1_4_1 + b_acc1_4*acc1_4_2 + b_acc1_4*acc1_4_3)
+ (b_acc2_4*acc2_4_1 + b_acc2_4*acc2_4_2 + b_acc2_4*acc2_4_3) + (b_bid_4 * bid_4_1 * b_bid_4 * bid_4_2 + b_bid_4 * bid_4_3)
I am not sure if I set up my model and functions correctly. Any comments, thoughts or ideas are warmly welcomed.
Best,
Zhenyu
I would like to analyze a dataset using the mixed logit model (based on Apollo_example_14). The dataset is a survey dataset and each respondent was presented with four choice sets (1,2,3, and 4). For each choice set, there are three options (option A, option B, and status quo). And there are four variables (coverage, accurancy1, accurancy2, and bid) for each option.
After transforming the dataset to the wide-format based on choice set and option, we have many variables. For example, coverage will be converted into cov_1_1, cov_1_2, cov_1_3, cov_2_1, cov_2_2, cov_2_3, cov_3_1, cov_3_2, cov_3_3, cov_4_1, cov_4_2, cov_4_3, and so on so forth. The first number indicates the choice set and the second number indicates the option.
Based on Apollo_example_14, I define the following model and likelihood function:
V1= (b_cov_1*cov_1_1 + b_cov_1*cov_1_2 + b_cov_1*cov_1_3) + (b_acc1_1*acc1_1_1 + b_acc1_1*acc1_1_2 + b_acc1_1*acc1_1_3)
+ (b_acc2_1*acc2_1_1 + b_acc2_1*acc2_1_2 + b_acc2_1*acc2_1_3) + (b_bid_1 * bid_1_1 * b_bid_1 * bid_1_2 + b_bid_1 * bid_1_3)
Similarly,
V4= (b_cov_4*cov_4_1 + b_cov_4*cov_4_2 + b_cov_4*cov_4_3) + (b_acc1_4*acc1_4_1 + b_acc1_4*acc1_4_2 + b_acc1_4*acc1_4_3)
+ (b_acc2_4*acc2_4_1 + b_acc2_4*acc2_4_2 + b_acc2_4*acc2_4_3) + (b_bid_4 * bid_4_1 * b_bid_4 * bid_4_2 + b_bid_4 * bid_4_3)
I am not sure if I set up my model and functions correctly. Any comments, thoughts or ideas are warmly welcomed.
Best,
Zhenyu