From 06b592a381d6fa7255b4180357e03b3a05feeac2 Mon Sep 17 00:00:00 2001 From: rakow Date: Tue, 3 Sep 2024 20:47:43 +0200 Subject: [PATCH] additional baseline variant --- input/v6.3/params/baseline_v3.yaml | 41 +++++++++++++++++++ .../estimate_biogeme_plan_choice.py | 10 ++++- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 input/v6.3/params/baseline_v3.yaml diff --git a/input/v6.3/params/baseline_v3.yaml b/input/v6.3/params/baseline_v3.yaml new file mode 100644 index 00000000..5bc002f8 --- /dev/null +++ b/input/v6.3/params/baseline_v3.yaml @@ -0,0 +1,41 @@ +#Modes: ['walk', 'pt', 'car', 'bike', 'ride'] +#Number of plans: 8259 +#Number of choices for plan: 70 +#Number of choices: 8259 +# Using fixed utility for car 0.0 +# Estimating car asc, instead of daily utility +# Using MXL modes ['car'] +# Results for model plan-choices-subtour_70_exp_income_price_perception_car_price_perception_pt +#Nbr of parameters: 6 +#Sample size: 8259 +#Excluded data: 0 +#Null log likelihood: -24858.3 +#Final log likelihood: -19682.68 +#Likelihood ratio test (null): 10351.23 +#Rho square (null): 0.208 +#Rho bar square (null): 0.208 +#Akaike Information Criterion: 39377.37 +#Bayesian Information Criterion: 39419.48 +# Value Rob. Std err Rob. t-test Rob. p-value +# ASC_bike -0.871526 0.019601 -44.464412 0.00000 +# ASC_car -1.009763 0.038571 -26.179679 0.00000 +# ASC_pt -0.492061 0.027867 -17.657342 0.00000 +# ASC_ride -1.405401 0.033764 -41.624197 0.00000 +# BETA_CAR_PRICE_PERCEPTION 0.161433 0.012282 13.143985 0.00000 +# EXP_INCOME 0.138746 0.032526 4.265680 0.00002 + +scoring: + scoringParameters: + - performing: 5.462690 + marginalUtilityOfMoney: 0.619586 + modeParams: + - mode: walk + constant: 0 + - mode: car + constant: 0 + dailyMonetaryConstant: -2.3084919 + - mode: pt + constant: 0 + dailyMonetaryConstant: -0.484299 +advancedScoring: + incomeExponent: 0.138746 \ No newline at end of file diff --git a/src/main/python/choicemodels/estimate_biogeme_plan_choice.py b/src/main/python/choicemodels/estimate_biogeme_plan_choice.py index 69c446cc..a5764b37 100644 --- a/src/main/python/choicemodels/estimate_biogeme_plan_choice.py +++ b/src/main/python/choicemodels/estimate_biogeme_plan_choice.py @@ -24,9 +24,11 @@ parser.add_argument("--performing", help="Beta for performing", type=float, default=6.88) parser.add_argument("--est-exp-income", help="Estimate exponent for income", action="store_true") parser.add_argument("--exp-income", help="Exponent for income", type=float, default=1) + parser.add_argument("--util-money", help="Utility of money", type=float, default=1) parser.add_argument("--est-util-money", help="Estimate utility of money", action="store_true") parser.add_argument("--est-price-perception-car", help="Estimate price perception", action="store_true") parser.add_argument("--est-price-perception-pt", help="Estimate price perception", action="store_true") + parser.add_argument("--same-price-perception", help="Only estimate one fixed price perception factor", action="store_true") parser.add_argument("--ascs", help="Predefined ASCs", nargs="+", action='append', default=[]) parser.add_argument("--car-util", help="Fixed utility for car", type=float, default=None) parser.add_argument("--no-mxl", help="Disable mixed logit", action="store_true") @@ -62,11 +64,15 @@ # Factor on marginal utility of money EXP_INCOME = Beta('EXP_INCOME', args.exp_income, 0, 1.5, ESTIMATE if args.est_exp_income else FIXED) - UTIL_MONEY = Beta('UTIL_MONEY', 1, 0, 2, ESTIMATE if args.est_util_money else FIXED) + UTIL_MONEY = Beta('UTIL_MONEY', args.util_money, 0, 2, ESTIMATE if args.est_util_money else FIXED) BETA_PERFORMING = Beta('BETA_PERFORMING', args.performing, 1, 15, ESTIMATE if args.est_performing else FIXED) BETA_CAR_PRICE_PERCEPTION = Beta('BETA_CAR_PRICE_PERCEPTION', 1, 0, 1, ESTIMATE if args.est_price_perception_car else FIXED) - BETA_PT_PRICE_PERCEPTION = Beta('BETA_PT_PRICE_PERCEPTION', 1, 0, 1, ESTIMATE if args.est_price_perception_pt else FIXED) + + if args.same_price_perception: + BETA_PT_PRICE_PERCEPTION = BETA_CAR_PRICE_PERCEPTION + else: + BETA_PT_PRICE_PERCEPTION = Beta('BETA_PT_PRICE_PERCEPTION', 1, 0, 1, ESTIMATE if args.est_price_perception_pt else FIXED) is_est_car = "car" in args.mxl_modes