From 024a9e23597aa38c81ca61721aedfdf1ce068d2c Mon Sep 17 00:00:00 2001 From: Jeff Newman Date: Fri, 6 Dec 2024 11:56:40 -0600 Subject: [PATCH] compare model 03 --- .../notebooks/03_work_location.ipynb | 1484 +++++++++++++---- 1 file changed, 1163 insertions(+), 321 deletions(-) diff --git a/activitysim/examples/example_estimation/notebooks/03_work_location.ipynb b/activitysim/examples/example_estimation/notebooks/03_work_location.ipynb index f6abcb174..4fc0fbc48 100644 --- a/activitysim/examples/example_estimation/notebooks/03_work_location.ipynb +++ b/activitysim/examples/example_estimation/notebooks/03_work_location.ipynb @@ -41,8 +41,8 @@ { "data": { "text/plain": [ - "{'larch': '6.0.31.dev37+gd94e3a6',\n", - " 'sharrow': '2.12.2.dev4+gea8174f',\n", + "{'larch': '6.0.33',\n", + " 'sharrow': '2.13.0',\n", " 'numpy': '1.26.4',\n", " 'pandas': '1.5.3',\n", " 'xarray': '2024.3.0',\n", @@ -2205,7 +2205,7 @@ " -2.375156e+00\n", " \n", " \n", - "tolerance8.618081038971004e-07stepsarray([0.125, 0.25 , 0.375, 0.5 , 0.625, 0.75 , 1. , 1. , 1. ])message'Optimization terminated successfully'elapsed_time0:00:02.229216method'BHHH'n_cases28281iteration_number9" + "tolerance8.618081038971004e-07stepsarray([0.125, 0.25 , 0.375, 0.5 , 0.625, 0.75 , 1. , 1. , 1. ])message'Optimization terminated successfully'elapsed_time0:00:02.528580method'BHHH'n_cases28281iteration_number9" ], "text/plain": [ "┣ loglike: -88683.85038605405\n", @@ -2247,7 +2247,7 @@ "┣ tolerance: 8.618081038971004e-07\n", "┣ steps: array([0.125, 0.25 , 0.375, 0.5 , 0.625, 0.75 , 1. , 1. , 1. ])\n", "┣ message: 'Optimization terminated successfully'\n", - "┣ elapsed_time: datetime.timedelta(seconds=2, microseconds=229216)\n", + "┣ elapsed_time: datetime.timedelta(seconds=2, microseconds=528580)\n", "┣ method: 'BHHH'\n", "┣ n_cases: 28281\n", "┣ iteration_number: 9" @@ -2278,28 +2278,28 @@ "data": { "text/html": [ "\n", - "\n", + "
\n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -2313,316 +2313,316 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
 ValueStd Errt StatSignifNull ValueConstrainedValueStd Errt StatSignifNull ValueConstrained
Parameter
-999-999. 0.00 NA 0.00fixed value
1 1.00 0.00 NA 0.00fixed value
coef_dist_0_1-1.04 0.105-9.89*** 0.00
coef_dist_0_5_high 0.147 0.0114 12.86*** 0.00
coef_dist_15_up-0.117 0.00211-55.56*** 0.00
coef_dist_1_2-0.465 0.0428-10.86*** 0.00
coef_dist_2_5-0.418 0.0116-36.15*** 0.00
coef_dist_5_15-0.156 0.00276-56.40*** 0.00
coef_dist_5_up_high 0.0251 0.00176 14.22*** 0.00
coef_mode_logsum 0.0742 0.00837 8.87*** 0.00
work_high_AGREMPN-1.86 0.596-3.11** 0.00
work_high_FPSEMPN-1.90 0.178-10.67*** 0.00
work_high_HEREMPN-1.70 0.193-8.81*** 0.00
work_high_MWTEMPN-1.82 0.188-9.68*** 0.00
work_high_OTHEMPN-2.19 0.207-10.56*** 0.00
work_high_RETEMPN-2.21 0.00 NA 0.00fixed value
work_low_AGREMPN-71.8 7.07e-12-BIG*** 0.00
work_low_FPSEMPN-1.51 0.346-4.36*** 0.00
work_low_HEREMPN-0.819 0.360-2.27* 0.00
work_low_MWTEMPN-1.98 0.387-5.12*** 0.00
work_low_OTHEMPN-2.02 0.407-4.97*** 0.00
work_low_RETEMPN-2.05 0.00 NA 0.00fixed value
work_med_AGREMPN-8.09e+64 NA NA 0.00
work_med_FPSEMPN-2.15 0.194-11.06*** 0.00
work_med_HEREMPN-1.61 0.205-7.85*** 0.00
work_med_MWTEMPN-2.04 0.210-9.74*** 0.00
work_med_OTHEMPN-2.17 0.222-9.77*** 0.00
work_med_RETEMPN-2.12 0.00 NA 0.00fixed value
work_veryhigh_AGREMPN-6.04 24.2-0.25 0.00
work_veryhigh_FPSEMPN-1.84 0.152-12.10*** 0.00
work_veryhigh_HEREMPN-1.99 0.170-11.71*** 0.00
work_veryhigh_MWTEMPN-1.76 0.159-11.08*** 0.00
work_veryhigh_OTHEMPN-2.51 0.189-13.24*** 0.00
work_veryhigh_RETEMPN-2.38 0.00 NA 0.00fixed value-999-999. 0.00 NA 0.00fixed value
1 1.00 0.00 NA 0.00fixed value
coef_dist_0_1-1.04 0.105-9.89*** 0.00
coef_dist_0_5_high 0.147 0.0114 12.86*** 0.00
coef_dist_15_up-0.117 0.00211-55.56*** 0.00
coef_dist_1_2-0.465 0.0428-10.86*** 0.00
coef_dist_2_5-0.418 0.0116-36.15*** 0.00
coef_dist_5_15-0.156 0.00276-56.40*** 0.00
coef_dist_5_up_high 0.0251 0.00176 14.22*** 0.00
coef_mode_logsum 0.0742 0.00837 8.87*** 0.00
work_high_AGREMPN-1.86 0.596-3.11** 0.00
work_high_FPSEMPN-1.90 0.178-10.67*** 0.00
work_high_HEREMPN-1.70 0.193-8.81*** 0.00
work_high_MWTEMPN-1.82 0.188-9.68*** 0.00
work_high_OTHEMPN-2.19 0.207-10.56*** 0.00
work_high_RETEMPN-2.21 0.00 NA 0.00fixed value
work_low_AGREMPN-71.8 7.07e-12-BIG*** 0.00
work_low_FPSEMPN-1.51 0.346-4.36*** 0.00
work_low_HEREMPN-0.819 0.360-2.27* 0.00
work_low_MWTEMPN-1.98 0.387-5.12*** 0.00
work_low_OTHEMPN-2.02 0.407-4.97*** 0.00
work_low_RETEMPN-2.05 0.00 NA 0.00fixed value
work_med_AGREMPN-8.09e+64 NA NA 0.00
work_med_FPSEMPN-2.15 0.194-11.06*** 0.00
work_med_HEREMPN-1.61 0.205-7.85*** 0.00
work_med_MWTEMPN-2.04 0.210-9.74*** 0.00
work_med_OTHEMPN-2.17 0.222-9.77*** 0.00
work_med_RETEMPN-2.12 0.00 NA 0.00fixed value
work_veryhigh_AGREMPN-6.04 24.2-0.25 0.00
work_veryhigh_FPSEMPN-1.84 0.152-12.10*** 0.00
work_veryhigh_HEREMPN-1.99 0.170-11.71*** 0.00
work_veryhigh_MWTEMPN-1.76 0.159-11.08*** 0.00
work_veryhigh_OTHEMPN-2.51 0.189-13.24*** 0.00
work_veryhigh_RETEMPN-2.38 0.00 NA 0.00fixed value
\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 13, @@ -4653,7 +4653,7 @@ " -2.375156\n", " \n", " \n", - "tolerance2.5082874166498626e-07stepsarray([0.25, 0.5 , 0.75, 1. , 1. , 1. , 1. , 1. ])message'Optimization terminated successfully'elapsed_time0:00:02.142913method'BHHH'n_cases28281iteration_number8" + "tolerance2.5082874166498626e-07stepsarray([0.25, 0.5 , 0.75, 1. , 1. , 1. , 1. , 1. ])message'Optimization terminated successfully'elapsed_time0:00:02.337866method'BHHH'n_cases28281iteration_number8" ], "text/plain": [ "┣ loglike: -88684.18177107332\n", @@ -4695,7 +4695,7 @@ "┣ tolerance: 2.5082874166498626e-07\n", "┣ steps: array([0.25, 0.5 , 0.75, 1. , 1. , 1. , 1. , 1. ])\n", "┣ message: 'Optimization terminated successfully'\n", - "┣ elapsed_time: datetime.timedelta(seconds=2, microseconds=142913)\n", + "┣ elapsed_time: datetime.timedelta(seconds=2, microseconds=337866)\n", "┣ method: 'BHHH'\n", "┣ n_cases: 28281\n", "┣ iteration_number: 8" @@ -4713,6 +4713,848 @@ "\n", "result2" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can then review the original and revised models side-by-side to see the differences." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
modelmodel2
Number of CasesAggregate28281.00000028281.000000
Log Likelihood at ConvergenceAggregate-88683.850386-88684.181771
Per Case-3.135810-3.135822
Log Likelihood at Null ParametersAggregate-124263.519724-124263.519724
Per Case-4.393887-4.393887
Rho Squared w.r.t. Null ParametersAggregate0.2863240.286322
\n", + "
" + ], + "text/plain": [ + " model model2\n", + "Number of Cases Aggregate 28281.000000 28281.000000\n", + "Log Likelihood at Convergence Aggregate -88683.850386 -88684.181771\n", + " Per Case -3.135810 -3.135822\n", + "Log Likelihood at Null Parameters Aggregate -124263.519724 -124263.519724\n", + " Per Case -4.393887 -4.393887\n", + "Rho Squared w.r.t. Null Parameters Aggregate 0.286324 0.286322" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "with pd.option_context('display.max_rows', 999):\n", + " display(pd.concat({\n", + " \"model\": model.estimation_statistics_raw(),\n", + " \"model2\": model2.estimation_statistics_raw(),\n", + " }, axis=1).fillna(\"\"))" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
modelmodel2
ValueStd Errt StatSignifNull ValueConstrainedValueStd Errt StatSignifNull ValueConstrained
Parameter
-999-999.0.00NA0.0fixed value-999.0.00NA0.0fixed value
11.000.00NA0.0fixed value1.000.00NA0.0fixed value
coef_dist_0_1-1.040.105-9.89***0.0-1.070.0946-11.33***0.0
coef_dist_0_5_high0.1470.011412.86***0.00.1470.011412.86***0.0
coef_dist_15_up-0.1170.00211-55.56***0.0-0.1170.00211-55.55***0.0
coef_dist_1_2-0.4650.0428-10.86***0.0
coef_dist_2_5-0.4180.0116-36.15***0.0
coef_dist_5_15-0.1560.00276-56.40***0.0-0.1560.00283-55.09***0.0
coef_dist_5_up_high0.02510.0017614.22***0.00.02500.0017614.20***0.0
coef_mode_logsum0.07420.008378.87***0.00.07450.008368.91***0.0
work_high_AGREMPN-1.860.596-3.11**0.0-1.860.597-3.11**0.0
work_high_FPSEMPN-1.900.178-10.67***0.0-1.900.178-10.67***0.0
work_high_HEREMPN-1.700.193-8.81***0.0-1.700.193-8.81***0.0
work_high_MWTEMPN-1.820.188-9.68***0.0-1.820.188-9.68***0.0
work_high_OTHEMPN-2.190.207-10.56***0.0-2.190.207-10.56***0.0
work_high_RETEMPN-2.210.00NA0.0fixed value-2.210.00NA0.0fixed value
work_low_AGREMPN-71.87.07e-12-BIG***0.0-287.NANA0.0
work_low_FPSEMPN-1.510.346-4.36***0.0-1.510.346-4.36***0.0
work_low_HEREMPN-0.8190.360-2.27*0.0-0.8180.361-2.27*0.0
work_low_MWTEMPN-1.980.387-5.12***0.0-1.980.387-5.11***0.0
work_low_OTHEMPN-2.020.407-4.97***0.0-2.020.407-4.96***0.0
work_low_RETEMPN-2.050.00NA0.0fixed value-2.050.00NA0.0fixed value
work_med_AGREMPN-8.09e+64NANA0.0-1.49e+03NANA0.0
work_med_FPSEMPN-2.150.194-11.06***0.0-2.150.195-11.05***0.0
work_med_HEREMPN-1.610.205-7.85***0.0-1.610.205-7.84***0.0
work_med_MWTEMPN-2.040.210-9.74***0.0-2.040.210-9.73***0.0
work_med_OTHEMPN-2.170.222-9.77***0.0-2.170.222-9.77***0.0
work_med_RETEMPN-2.120.00NA0.0fixed value-2.120.00NA0.0fixed value
work_veryhigh_AGREMPN-6.0424.2-0.250.0-6.0323.7-0.250.0
work_veryhigh_FPSEMPN-1.840.152-12.10***0.0-1.840.152-12.10***0.0
work_veryhigh_HEREMPN-1.990.170-11.71***0.0-1.990.170-11.71***0.0
work_veryhigh_MWTEMPN-1.760.159-11.08***0.0-1.760.159-11.08***0.0
work_veryhigh_OTHEMPN-2.510.189-13.24***0.0-2.510.189-13.24***0.0
work_veryhigh_RETEMPN-2.380.00NA0.0fixed value-2.380.00NA0.0fixed value
coef_dist_1_3-0.4340.0202-21.48***0.0
coef_dist_3_5-0.4170.0156-26.81***0.0
\n", + "
" + ], + "text/plain": [ + " model \\\n", + " Value Std Err t Stat Signif Null Value \n", + "Parameter \n", + "-999 -999.  0.00  NA 0.0 \n", + "1  1.00  0.00  NA 0.0 \n", + "coef_dist_0_1 -1.04  0.105 -9.89 *** 0.0 \n", + "coef_dist_0_5_high  0.147  0.0114  12.86 *** 0.0 \n", + "coef_dist_15_up -0.117  0.00211 -55.56 *** 0.0 \n", + "coef_dist_1_2 -0.465  0.0428 -10.86 *** 0.0 \n", + "coef_dist_2_5 -0.418  0.0116 -36.15 *** 0.0 \n", + "coef_dist_5_15 -0.156  0.00276 -56.40 *** 0.0 \n", + "coef_dist_5_up_high  0.0251  0.00176  14.22 *** 0.0 \n", + "coef_mode_logsum  0.0742  0.00837  8.87 *** 0.0 \n", + "work_high_AGREMPN -1.86  0.596 -3.11 ** 0.0 \n", + "work_high_FPSEMPN -1.90  0.178 -10.67 *** 0.0 \n", + "work_high_HEREMPN -1.70  0.193 -8.81 *** 0.0 \n", + "work_high_MWTEMPN -1.82  0.188 -9.68 *** 0.0 \n", + "work_high_OTHEMPN -2.19  0.207 -10.56 *** 0.0 \n", + "work_high_RETEMPN -2.21  0.00  NA 0.0 \n", + "work_low_AGREMPN -71.8  7.07e-12 -BIG *** 0.0 \n", + "work_low_FPSEMPN -1.51  0.346 -4.36 *** 0.0 \n", + "work_low_HEREMPN -0.819  0.360 -2.27 * 0.0 \n", + "work_low_MWTEMPN -1.98  0.387 -5.12 *** 0.0 \n", + "work_low_OTHEMPN -2.02  0.407 -4.97 *** 0.0 \n", + "work_low_RETEMPN -2.05  0.00  NA 0.0 \n", + "work_med_AGREMPN -8.09e+64  NA  NA 0.0 \n", + "work_med_FPSEMPN -2.15  0.194 -11.06 *** 0.0 \n", + "work_med_HEREMPN -1.61  0.205 -7.85 *** 0.0 \n", + "work_med_MWTEMPN -2.04  0.210 -9.74 *** 0.0 \n", + "work_med_OTHEMPN -2.17  0.222 -9.77 *** 0.0 \n", + "work_med_RETEMPN -2.12  0.00  NA 0.0 \n", + "work_veryhigh_AGREMPN -6.04  24.2 -0.25 0.0 \n", + "work_veryhigh_FPSEMPN -1.84  0.152 -12.10 *** 0.0 \n", + "work_veryhigh_HEREMPN -1.99  0.170 -11.71 *** 0.0 \n", + "work_veryhigh_MWTEMPN -1.76  0.159 -11.08 *** 0.0 \n", + "work_veryhigh_OTHEMPN -2.51  0.189 -13.24 *** 0.0 \n", + "work_veryhigh_RETEMPN -2.38  0.00  NA 0.0 \n", + "coef_dist_1_3 \n", + "coef_dist_3_5 \n", + "\n", + " model2 \\\n", + " Constrained Value Std Err t Stat Signif \n", + "Parameter \n", + "-999 fixed value -999.  0.00  NA \n", + "1 fixed value  1.00  0.00  NA \n", + "coef_dist_0_1 -1.07  0.0946 -11.33 *** \n", + "coef_dist_0_5_high  0.147  0.0114  12.86 *** \n", + "coef_dist_15_up -0.117  0.00211 -55.55 *** \n", + "coef_dist_1_2 \n", + "coef_dist_2_5 \n", + "coef_dist_5_15 -0.156  0.00283 -55.09 *** \n", + "coef_dist_5_up_high  0.0250  0.00176  14.20 *** \n", + "coef_mode_logsum  0.0745  0.00836  8.91 *** \n", + "work_high_AGREMPN -1.86  0.597 -3.11 ** \n", + "work_high_FPSEMPN -1.90  0.178 -10.67 *** \n", + "work_high_HEREMPN -1.70  0.193 -8.81 *** \n", + "work_high_MWTEMPN -1.82  0.188 -9.68 *** \n", + "work_high_OTHEMPN -2.19  0.207 -10.56 *** \n", + "work_high_RETEMPN fixed value -2.21  0.00  NA \n", + "work_low_AGREMPN -287.  NA  NA \n", + "work_low_FPSEMPN -1.51  0.346 -4.36 *** \n", + "work_low_HEREMPN -0.818  0.361 -2.27 * \n", + "work_low_MWTEMPN -1.98  0.387 -5.11 *** \n", + "work_low_OTHEMPN -2.02  0.407 -4.96 *** \n", + "work_low_RETEMPN fixed value -2.05  0.00  NA \n", + "work_med_AGREMPN -1.49e+03  NA  NA \n", + "work_med_FPSEMPN -2.15  0.195 -11.05 *** \n", + "work_med_HEREMPN -1.61  0.205 -7.84 *** \n", + "work_med_MWTEMPN -2.04  0.210 -9.73 *** \n", + "work_med_OTHEMPN -2.17  0.222 -9.77 *** \n", + "work_med_RETEMPN fixed value -2.12  0.00  NA \n", + "work_veryhigh_AGREMPN -6.03  23.7 -0.25 \n", + "work_veryhigh_FPSEMPN -1.84  0.152 -12.10 *** \n", + "work_veryhigh_HEREMPN -1.99  0.170 -11.71 *** \n", + "work_veryhigh_MWTEMPN -1.76  0.159 -11.08 *** \n", + "work_veryhigh_OTHEMPN -2.51  0.189 -13.24 *** \n", + "work_veryhigh_RETEMPN fixed value -2.38  0.00  NA \n", + "coef_dist_1_3 -0.434  0.0202 -21.48 *** \n", + "coef_dist_3_5 -0.417  0.0156 -26.81 *** \n", + "\n", + " \n", + " Null Value Constrained \n", + "Parameter \n", + "-999 0.0 fixed value \n", + "1 0.0 fixed value \n", + "coef_dist_0_1 0.0 \n", + "coef_dist_0_5_high 0.0 \n", + "coef_dist_15_up 0.0 \n", + "coef_dist_1_2 \n", + "coef_dist_2_5 \n", + "coef_dist_5_15 0.0 \n", + "coef_dist_5_up_high 0.0 \n", + "coef_mode_logsum 0.0 \n", + "work_high_AGREMPN 0.0 \n", + "work_high_FPSEMPN 0.0 \n", + "work_high_HEREMPN 0.0 \n", + "work_high_MWTEMPN 0.0 \n", + "work_high_OTHEMPN 0.0 \n", + "work_high_RETEMPN 0.0 fixed value \n", + "work_low_AGREMPN 0.0 \n", + "work_low_FPSEMPN 0.0 \n", + "work_low_HEREMPN 0.0 \n", + "work_low_MWTEMPN 0.0 \n", + "work_low_OTHEMPN 0.0 \n", + "work_low_RETEMPN 0.0 fixed value \n", + "work_med_AGREMPN 0.0 \n", + "work_med_FPSEMPN 0.0 \n", + "work_med_HEREMPN 0.0 \n", + "work_med_MWTEMPN 0.0 \n", + "work_med_OTHEMPN 0.0 \n", + "work_med_RETEMPN 0.0 fixed value \n", + "work_veryhigh_AGREMPN 0.0 \n", + "work_veryhigh_FPSEMPN 0.0 \n", + "work_veryhigh_HEREMPN 0.0 \n", + "work_veryhigh_MWTEMPN 0.0 \n", + "work_veryhigh_OTHEMPN 0.0 \n", + "work_veryhigh_RETEMPN 0.0 fixed value \n", + "coef_dist_1_3 0.0 \n", + "coef_dist_3_5 0.0 " + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "with pd.option_context('display.max_rows', 999):\n", + " display(pd.concat({\n", + " \"model\": model.parameter_summary().data,\n", + " \"model2\": model2.parameter_summary().data,\n", + " }, axis=1).fillna(\"\"))" + ] } ], "metadata": {