DRCOG Model Estimation


In [1]:
import numpy as np, pandas as pd, os
from synthicity.utils import misc
from drcog.models import regression_model_estimation, choice_model_estimation, dataset
dset = dataset.DRCOGDataset(os.path.join(misc.data_dir(),'drcog.h5'))
np.random.seed(1)

##Variable Library
from drcog.variables import variable_library
variable_library.calculate_variables(dset)

establishments = dset.establishments
households = dset.households
households_for_estimation = dset.households_for_estimation
buildings = dset.buildings
parcels = dset.parcels


Fetching parcels
Fetching modify_table
Fetching buildings
Fetching establishments
Fetching modify_table
Fetching modify_table
Fetching households_for_estimation
Fetching modify_table
Fetching households
Fetching modify_table
Fetching zones
Fetching modify_table
Fetching travel_data
Fetching modify_table

In [3]:
dset.buildings.index.name


Out[3]:
'building_id'

In [27]:
buildings = dset.fetch('buildings')[['building_type_id','improvement_value','land_area','non_residential_sqft','parcel_id','residential_units','sqft_per_unit','stories','tax_exempt','year_built','bldg_sq_ft','unit_price_non_residential','unit_price_residential','building_sqft_per_job','non_residential_units','base_year_jobs','all_units']]
establishments = dset.fetch('establishments')
del establishments['zone_id']
del establishments['county_id']
households = dset.fetch('households')
del households['zone_id']
del households['county_id']
parcels = dset.fetch('parcels')
parcels_urbancen = dset.store.parcels_urbancen.set_index('parcel_id')
parcels['urbancenter_id'] = parcels_urbancen.urban_cen
zones = dset.fetch('zones')
pz = pd.merge(parcels.reset_index(),zones,left_on='zone_id',right_index=True,how='left')
pz = pz.set_index('parcel_id')
bpz = pd.merge(buildings,pz,left_on='parcel_id',right_index=True)

In [29]:
bpz.index.name


Out[29]:
'building_id'

In [7]:
households[['cars']].head()


Out[7]:
cars
household_id
1 0
63883 0
63884 0
128765 0
156438 0

In [3]:
buildings = pd.merge(buildings,parcels,left_on='parcel_id',right_index=True)

In [6]:
buildings[['residential_units']].head()


Out[6]:
residential_units
building_id
55152 24
55154 24
55153 24
55155 24
920048 1

In [8]:
households = pd.merge(households,buildings,left_on='building_id',right_index=True)

In [9]:
households[['cars']].head()


Out[9]:
cars
household_id
1 0
63883 0
64772 1
65158 1
65302 2

In [10]:
hh = households[['building_id']].reset_index()

In [12]:
hh.head()


Out[12]:
household_id building_id
0 1 914299
1 63883 94099
2 64772 94099
3 65158 94099
4 65302 94099

In [13]:
hh.rename(columns={'index':'tempid'},inplace=True)

In [15]:
hh.head()


Out[15]:
household_id building_id
0 1 914299
1 63883 94099
2 64772 94099
3 65158 94099
4 65302 94099

In [16]:
h = dset.fetch('households')[['serialno','building_id']]
b = dset.fetch('buildings')[['residential_units','parcel_id','building_type_id']]
p = dset.fetch('parcels')[['zone_id']]
z = dset.fetch('zones')[['external_zone_id']]
p['taz'] = z.external_zone_id[p.zone_id].values
hb = pd.merge(h,b,left_on='building_id',right_index=True)
hbp = pd.merge(hb,p,left_on='parcel_id',right_index=True)
bp = pd.merge(b,p,left_on='parcel_id',right_index=True)
h_for_export = hbp[['taz','serialno','residential_units','building_type_id']]

In [25]:
bpz = pd.merge(buildings,pz,left_on='parcel_id',right_index=True)


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-25-180689b7df08> in <module>()
----> 1 bpz

NameError: name 'bpz' is not defined

In [18]:
h_for_export.index.name


Out[18]:
'household_id'

In [19]:
from drcog.variables import pums_vars
pums_hh, pums_p = pums_vars.get_pums()

In [20]:
hh_for_export = pd.merge(h_for_export,pums_hh,left_on='serialno',right_index=True)
print hh_for_export.index.name


household_id

Household Location Choice Model Estimation


In [24]:
##Specify independent variables for each segment here.  Each variable must be represented in the variable library.  
##There must be a set of independent variables corresponding to each segment.  
ind_vars1=['ln_dist_rail','ln_avg_unit_price_zone','median_age_of_head','median_yearbuilt_post_1990','percent_hh_with_child_x_hh_with_child','percent_renter_hh_in_zone',
           'townhome','multifamily','jobs_within_45min']
ind_vars2=['ln_dist_rail','income5xlt_x_avg_unit_price_zone','median_age_of_head','median_yearbuilt_post_1990','median_yearbuilt_pre_1950','percent_hh_with_child_x_hh_with_child','percent_renter_hh_in_zone',
           'multifamily','ln_income_x_average_resunit_size','wkrs_hhs_x_ln_jobs_within_30min']
ind_vars3=['ln_dist_rail','income5xlt_x_avg_unit_price_zone','median_age_of_head','mean_income','median_yearbuilt_post_1990','median_yearbuilt_pre_1950','ln_income_x_average_resunit_size','percent_renter_hh_in_zone',
           'cherry_creek_school_district','percent_younghead_x_younghead','ln_jobs_within_30min']
ind_vars4=['ln_dist_rail','percent_hh_with_child_x_hh_with_child','percent_renter_hh_in_zone',
           'multifamily','percent_younghead_x_younghead','ln_emp_sector3_within_20min','allpurpose_agglosum_floor']
ind_vars5=['income5xlt_x_avg_unit_price_zone','median_age_of_head','mean_income','median_yearbuilt_post_1990','percent_hh_with_child_x_hh_with_child','percent_renter_hh_in_zone',
           'townhome','multifamily','percent_younghead_x_younghead','wkrs_hhs_x_ln_jobs_within_30min']

##Estimate
choice_model_estimation.estimate(dset,[ind_vars1,ind_vars2,ind_vars3,ind_vars4,ind_vars5],depvar = 'building_id',alternatives=dset.buildings,
                         SAMPLE_SIZE=100,max_segment_size = 1200,estimation_table = 'households_for_estimation',
                         output_names=("drcog-coeff-hlcm-%s.csv","DRCOG HOUSEHOLD LOCATION CHOICE MODELS (%s)","hh_location_%s","household_building_ids"),
                         agents_groupby= ['income_3_tenure',])


Estimating parameters for segment = 1, size = 232
Null Log-liklihood: -1068.399483
Log-liklihood at convergence: -962.757718
Log-liklihood ratio: 0.098879
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
| ln dist rail |       -0.150 |        0.050 |       -2.900 | **           |
+--------------+--------------+--------------+--------------+--------------+
|  ln avg unit |        0.080 |        0.070 |        1.150 |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   median age |        0.080 |        0.010 |        6.080 | ***          |
|      of head |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       median |        0.500 |        0.180 |        2.790 | **           |
|    yearbuilt |              |              |              |              |
|    post 1990 |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   percent hh |        0.020 |            0 |        5.280 | ***          |
| with child x |              |              |              |              |
|      hh with |              |              |              |              |
|        child |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|      percent |        0.040 |        0.010 |        5.530 | ***          |
| renter hh in |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|     townhome |        1.240 |        0.240 |        5.250 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|  multifamily |        1.880 |        0.160 |       11.440 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|  jobs within |            0 |            0 |        0.180 |              |
|        45min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 2, size = 462
Null Log-liklihood: -2127.588626
Log-liklihood at convergence: -2053.280628
Log-liklihood ratio: 0.034926
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
| ln dist rail |       -0.120 |        0.040 |       -3.050 | **           |
+--------------+--------------+--------------+--------------+--------------+
| income5xlt x |       -0.930 |        0.350 |       -2.660 | **           |
|     avg unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   median age |        0.020 |        0.010 |        2.280 | *            |
|      of head |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       median |        0.580 |        0.120 |        4.750 | ***          |
|    yearbuilt |              |              |              |              |
|    post 1990 |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       median |        0.700 |        0.160 |        4.440 | ***          |
|    yearbuilt |              |              |              |              |
|     pre 1950 |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   percent hh |            0 |            0 |       -0.350 |              |
| with child x |              |              |              |              |
|      hh with |              |              |              |              |
|        child |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|      percent |       -0.020 |        0.010 |       -3.600 | ***          |
| renter hh in |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  multifamily |        1.160 |        0.170 |        6.770 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|  ln income x |            0 |            0 |        3.520 | ***          |
|      average |              |              |              |              |
| resunit size |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   wkrs hhs x |        0.220 |        0.010 |       17.530 | ***          |
|      ln jobs |              |              |              |              |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 3, size = 268
Null Log-liklihood: -1234.185610
Log-liklihood at convergence: -1149.863263
Log-liklihood ratio: 0.068322
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
| ln dist rail |       -0.290 |        0.050 |       -5.510 | ***          |
+--------------+--------------+--------------+--------------+--------------+
| income5xlt x |       -0.010 |        0.620 |       -0.010 |              |
|     avg unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   median age |       -0.060 |        0.020 |       -2.720 | **           |
|      of head |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  mean income |            0 |            0 |        3.360 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|       median |        0.030 |        0.160 |        0.190 |              |
|    yearbuilt |              |              |              |              |
|    post 1990 |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       median |        0.130 |        0.200 |        0.660 |              |
|    yearbuilt |              |              |              |              |
|     pre 1950 |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  ln income x |            0 |            0 |        5.130 | ***          |
|      average |              |              |              |              |
| resunit size |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|      percent |        0.010 |        0.020 |        0.650 |              |
| renter hh in |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
| cherry creek |        0.070 |        0.200 |        0.350 |              |
|       school |              |              |              |              |
|     district |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|      percent |        0.050 |        0.020 |        2.780 | **           |
|  younghead x |              |              |              |              |
|    younghead |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|      ln jobs |        0.230 |        0.090 |        2.400 | **           |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 4, size = 263
Null Log-liklihood: -1211.159759
Log-liklihood at convergence: -793.813038
Log-liklihood ratio: 0.344584
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
| ln dist rail |       -0.100 |        0.040 |       -2.530 | **           |
+--------------+--------------+--------------+--------------+--------------+
|   percent hh |            0 |            0 |        0.790 |              |
| with child x |              |              |              |              |
|      hh with |              |              |              |              |
|        child |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|      percent |        0.040 |        0.010 |        6.370 | ***          |
| renter hh in |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  multifamily |        2.910 |        0.150 |       19.970 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|      percent |        0.030 |        0.010 |        4.480 | ***          |
|  younghead x |              |              |              |              |
|    younghead |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.260 |        0.090 |       -2.930 | **           |
|      sector3 |              |              |              |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   allpurpose |        0.250 |        0.060 |        4.190 | ***          |
|     agglosum |              |              |              |              |
|        floor |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 5, size = 217
Null Log-liklihood: -999.321930
Log-liklihood at convergence: -832.019302
Log-liklihood ratio: 0.167416
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
| income5xlt x |       -0.210 |        0.280 |       -0.740 |              |
|     avg unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   median age |       -0.040 |        0.010 |       -3.910 | ***          |
|      of head |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  mean income |            0 |            0 |       -0.650 |              |
+--------------+--------------+--------------+--------------+--------------+
|       median |        0.690 |        0.170 |        3.980 | ***          |
|    yearbuilt |              |              |              |              |
|    post 1990 |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   percent hh |        0.020 |            0 |        6.330 | ***          |
| with child x |              |              |              |              |
|      hh with |              |              |              |              |
|        child |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|      percent |        0.010 |        0.010 |        0.990 |              |
| renter hh in |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|     townhome |        0.700 |        0.280 |        2.520 | **           |
+--------------+--------------+--------------+--------------+--------------+
|  multifamily |        2.490 |        0.170 |       14.760 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|      percent |        0.040 |        0.010 |        4.550 | ***          |
|  younghead x |              |              |              |              |
|    younghead |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   wkrs hhs x |        0.400 |        0.020 |       22.920 | ***          |
|      ln jobs |              |              |              |              |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+

Establishment Location Choice Model


In [3]:
##Specify independent variables for each segment here.  Each variable must be represented in the variable library.  
##There must be a set of independent variables corresponding to each segment.  
ind_vars11=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_dist_rail','rail_within_mile']
ind_vars21=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector3_within_15min','rail_within_mile']
ind_vars22=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector3_within_15min','rail_within_mile']
ind_vars23=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector3_within_15min','rail_within_mile']
ind_vars31=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector3_within_15min','rail_within_mile']
ind_vars32=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector3_within_15min','rail_within_mile']
ind_vars33=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector3_within_15min','rail_within_mile']
ind_vars42=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector2_within_15min','rail_within_mile']
ind_vars44=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector5_within_15min','rail_within_mile']
ind_vars45=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector5_within_15min','rail_within_mile']
ind_vars48=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector3_within_15min','rail_within_mile']
ind_vars49=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector3_within_15min','rail_within_mile']
ind_vars51=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars52=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars53=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars54=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars55=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars56=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars61=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector1_within_15min','rail_within_mile']
ind_vars62=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars71=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector2_within_15min','rail_within_mile']
ind_vars81=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars92=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector6_within_15min','rail_within_mile']
ind_vars7211=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector5_within_15min','rail_within_mile']
ind_vars7221=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector4_within_15min','rail_within_mile']
ind_vars7222=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector4_within_15min','rail_within_mile']
ind_vars7223=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector5_within_15min','rail_within_mile']
ind_vars7224=['ln_jobs_within_30min','ln_avg_nonres_unit_price_zone','median_year_built','ln_residential_unit_density_zone','ln_pop_within_20min','nonres_far',
           'office','retail_or_restaurant','industrial_building','employees_x_ln_non_residential_sqft_zone','ln_emp_sector4_within_15min','rail_within_mile']

##Apply filters
dset.d['establishments_for_estimation'] = establishments[(establishments.building_id>0)*(establishments.home_based_status==0)*(establishments.nonres_sqft>0)]

##Estimate
choice_model_estimation.estimate(dset,[ind_vars11,ind_vars21,ind_vars22,ind_vars23,ind_vars31,ind_vars32,ind_vars33,ind_vars42,ind_vars44,ind_vars45,ind_vars48,ind_vars49,ind_vars51,ind_vars52,ind_vars53,ind_vars54,ind_vars55,ind_vars56,ind_vars61,ind_vars62,ind_vars71,ind_vars81,ind_vars92,ind_vars7211,ind_vars7221,ind_vars7222,ind_vars7223,ind_vars7224],depvar = 'building_id',alternatives=dset.buildings,
                         SAMPLE_SIZE=100,max_segment_size = 2400,estimation_table = 'establishments_for_estimation',
                         output_names=("drcog-coeff-elcm-%s.csv","DRCOG EMPLOYMENT LOCATION CHOICE MODELS (%s)","emp_location_%s","establishment_building_ids"),
                         agents_groupby= ['sector_id_retail_agg',])


Estimating parameters for segment = 11, size = 181
Null Log-liklihood: -833.535804
Log-liklihood at convergence: -582.239386
Log-liklihood ratio: 0.301482
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.040 |        0.180 |        0.210 |              |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.060 |        0.040 |       -1.360 | .            |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |       -0.410 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.160 |        0.150 |       -7.520 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.050 |        0.160 |        0.330 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |        0.010 |        0.070 |        0.140 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.250 |       11.970 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.840 |        0.260 |       11.080 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.710 |        0.240 |       11.460 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       10.750 | ***          |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
| ln dist rail |        0.450 |        0.060 |        7.270 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.910 |        0.390 |        2.340 | **           |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 21, size = 698
Null Log-liklihood: -3214.408790
Log-liklihood at convergence: -986.227047
Log-liklihood ratio: 0.693186
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        1.650 |        0.200 |        8.360 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.170 |        0.030 |       -5.270 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        0.320 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.820 |        0.120 |       -6.880 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.680 |        0.230 |           -3 | **           |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.140 |        0.100 |       -1.450 | .            |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.160 |       18.600 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        0.500 |        0.300 |        1.710 | *            |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        1.950 |        0.180 |       10.780 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |        0.190 |              |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.100 |        0.080 |       -1.150 |              |
|      sector3 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        2.170 |        0.140 |       15.130 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 22, size = 201
Null Log-liklihood: -925.639207
Log-liklihood at convergence: -495.241054
Log-liklihood ratio: 0.464974
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.310 |        0.240 |        1.330 | .            |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |        0.050 |        0.050 |        1.030 |              |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        0.840 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.220 |        0.180 |       -6.640 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.240 |        0.270 |       -0.890 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.040 |        0.070 |       -0.560 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.240 |       12.310 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.280 |        0.300 |        7.490 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |            3 |        0.250 |       12.110 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.470 | .            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |        0.080 |        0.100 |        0.840 |              |
|      sector3 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.840 |        0.240 |        3.510 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 23, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -5351.329472
Log-liklihood ratio: 0.515822
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.780 |        0.090 |        8.610 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.010 |        0.010 |       -0.700 |              |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        4.280 | ***          |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.040 |        0.050 |      -20.540 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.120 |        0.100 |       -1.120 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.010 |        0.020 |       -0.550 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.080 |       35.880 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.580 |        0.090 |       28.260 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |            3 |        0.080 |       37.640 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -2.890 | **           |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |        0.070 |        0.030 |        2.240 | *            |
|      sector3 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.810 |        0.060 |       13.650 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 31, size = 589
Null Log-liklihood: -2712.445240
Log-liklihood at convergence: -1278.661409
Log-liklihood ratio: 0.528595
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.610 |        0.220 |        2.780 | **           |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.060 |        0.030 |       -2.360 | **           |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        3.780 | ***          |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.650 |        0.100 |       -6.490 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.280 |        0.260 |        1.080 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.040 |        0.040 |       -0.810 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |        2.450 |        0.280 |        8.870 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.230 |       13.180 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |            3 |        0.230 |       13.280 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |        0.100 |              |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |        0.050 |        0.070 |        0.690 |              |
|      sector3 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.260 |        0.130 |        2.040 | *            |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 32, size = 1164
Null Log-liklihood: -5360.418096
Log-liklihood at convergence: -2375.228533
Log-liklihood ratio: 0.556895
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        1.240 |        0.150 |        8.430 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.030 |        0.020 |       -1.950 | *            |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        5.940 | ***          |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.270 |        0.080 |      -15.920 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.340 |        0.170 |       -2.010 | *            |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.030 |        0.030 |       -0.820 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |        2.920 |        0.170 |       17.670 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.540 |        0.160 |       15.880 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |            3 |        0.140 |       21.180 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.420 | .            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |        0.120 |        0.050 |        2.250 | *            |
|      sector3 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.640 |        0.090 |        7.050 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 33, size = 2112
Null Log-liklihood: -9726.119433
Log-liklihood at convergence: -4500.578174
Log-liklihood ratio: 0.537269
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.370 |        0.100 |        3.550 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.010 |        0.010 |       -0.540 |              |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        6.670 | ***          |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.140 |        0.060 |      -19.910 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.120 |        0.120 |        1.030 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.010 |        0.020 |       -0.430 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.120 |       25.060 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.170 |        0.120 |       17.640 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |            3 |        0.100 |       29.030 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -0.920 |              |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |        0.290 |        0.040 |        7.950 | ***          |
|      sector3 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.500 |        0.070 |        7.250 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 42, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -4937.419988
Log-liklihood ratio: 0.553272
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        1.330 |        0.090 |       15.340 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.010 |        0.010 |       -0.680 |              |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        5.290 | ***          |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.210 |        0.050 |      -22.180 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.180 |        0.090 |        1.880 | *            |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.010 |        0.020 |       -0.400 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.100 |       29.560 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.680 |        0.110 |       25.210 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |            3 |        0.100 |       31.360 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.180 |              |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.200 |        0.030 |       -6.600 | ***          |
|      sector2 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.510 |        0.060 |        8.690 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 44, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -5475.387148
Log-liklihood ratio: 0.504598
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.660 |        0.090 |        7.240 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.080 |        0.010 |       -6.280 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        4.560 | ***          |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.540 |        0.050 |      -11.840 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.190 |        0.110 |        1.650 | *            |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.020 |        0.020 |       -1.150 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |        2.690 |        0.110 |       25.360 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.080 |       35.390 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.270 |        0.100 |       23.070 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -2.210 | *            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.110 |        0.050 |       -2.030 | *            |
|      sector5 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.250 |        0.060 |        4.010 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 45, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -5729.290231
Log-liklihood ratio: 0.481625
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.560 |        0.090 |        6.540 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.060 |        0.010 |       -4.980 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        1.990 | *            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.500 |        0.050 |      -11.050 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.090 |        0.110 |        0.820 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.020 |        0.020 |       -1.130 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |        2.910 |        0.090 |       31.390 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.070 |       40.720 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.550 |        0.090 |       29.470 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -5.680 | ***          |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.120 |        0.050 |       -2.560 | **           |
|      sector5 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.450 |        0.060 |        7.460 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 48, size = 1294
Null Log-liklihood: -5959.090221
Log-liklihood at convergence: -2605.276318
Log-liklihood ratio: 0.562806
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        1.590 |        0.110 |       14.400 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.030 |        0.020 |       -1.740 | *            |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        2.070 | *            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.340 |        0.080 |      -17.560 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.210 |        0.130 |        1.540 | .            |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |        0.060 |        0.020 |        2.700 | **           |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.120 |       25.430 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.600 |        0.130 |       20.590 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |            3 |        0.110 |       28.540 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -2.310 | *            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.610 |        0.040 |      -14.150 | ***          |
|      sector3 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |       -0.060 |        0.090 |       -0.640 |              |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 49, size = 489
Null Log-liklihood: -2251.928221
Log-liklihood at convergence: -1162.257449
Log-liklihood ratio: 0.483883
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        1.080 |        0.150 |        7.460 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.020 |        0.030 |       -0.600 |              |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        1.620 | .            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.080 |        0.120 |       -8.880 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.160 |        0.180 |       -0.860 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |            0 |        0.040 |       -0.040 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.190 |       16.100 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.780 |        0.180 |       15.880 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |            3 |        0.150 |       19.890 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.360 | .            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.250 |        0.070 |       -3.670 | ***          |
|      sector3 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.220 |        0.150 |        1.490 | .            |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 51, size = 1825
Null Log-liklihood: -8404.435589
Log-liklihood at convergence: -4167.420425
Log-liklihood ratio: 0.504140
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.160 |        0.100 |        1.600 | .            |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.100 |        0.010 |       -7.330 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        0.690 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.730 |        0.050 |      -13.260 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.560 |        0.120 |        4.600 | ***          |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.050 |        0.030 |       -1.770 | *            |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.080 |       39.360 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.730 |        0.090 |       31.070 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.480 |        0.090 |       27.990 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -2.710 | **           |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.310 |        0.050 |       -6.650 | ***          |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        1.120 |        0.060 |       17.530 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 52, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -4737.728608
Log-liklihood ratio: 0.571340
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.480 |        0.100 |        4.700 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.080 |        0.010 |       -6.420 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        1.590 | .            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.610 |        0.050 |      -12.810 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.210 |        0.120 |        1.750 | *            |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.030 |        0.020 |       -1.210 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.090 |       32.330 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.850 |        0.100 |       28.580 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        0.430 |        0.160 |        2.760 | **           |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.950 | *            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.070 |        0.050 |       -1.570 | .            |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        1.150 |        0.060 |       18.870 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 53, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -5405.521429
Log-liklihood ratio: 0.510919
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.660 |        0.090 |        7.030 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.090 |        0.010 |       -7.290 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        2.980 | **           |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.660 |        0.050 |      -14.100 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.010 |        0.110 |        0.070 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.030 |        0.020 |       -1.130 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.070 |       41.040 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.930 |        0.080 |       35.940 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.360 |        0.090 |       27.350 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -3.760 | ***          |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.090 |        0.040 |       -2.080 | *            |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.930 |        0.060 |       16.210 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 54, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -5040.894540
Log-liklihood ratio: 0.543910
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.820 |        0.090 |        8.680 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.150 |        0.010 |      -11.590 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |       -0.270 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.460 |        0.050 |       -9.420 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.220 |        0.110 |       -1.920 | *            |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.040 |        0.030 |       -1.600 | .            |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.080 |       39.860 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.260 |        0.090 |       24.790 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.060 |        0.090 |       22.460 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -2.930 | **           |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.070 |        0.040 |       -1.700 | *            |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        1.280 |        0.060 |       22.230 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 55, size = 782
Null Log-liklihood: -3601.243085
Log-liklihood at convergence: -1527.583706
Log-liklihood ratio: 0.575818
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        1.050 |        0.170 |        6.190 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.070 |        0.020 |       -3.260 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        1.790 | *            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.170 |        0.090 |      -12.800 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.010 |        0.200 |        0.060 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.110 |        0.070 |       -1.630 | .            |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.130 |       22.420 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.200 |        0.160 |       13.380 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.340 |        0.150 |       15.140 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.820 | *            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.160 |        0.080 |       -2.040 | *            |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        1.360 |        0.110 |       12.830 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 56, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -5463.803695
Log-liklihood ratio: 0.505646
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.850 |        0.090 |        9.220 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.090 |        0.010 |       -7.130 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        0.510 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.650 |        0.050 |      -13.670 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.070 |        0.110 |       -0.640 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.020 |        0.020 |           -1 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.070 |       41.460 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.900 |        0.080 |       35.940 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.900 |        0.080 |       37.110 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -2.700 | **           |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.110 |        0.040 |       -2.790 | **           |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.980 |        0.060 |       17.160 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 61, size = 2146
Null Log-liklihood: -9882.695219
Log-liklihood at convergence: -7461.922037
Log-liklihood ratio: 0.244951
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.430 |        0.090 |        4.780 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.030 |        0.010 |       -2.500 | **           |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        1.900 | *            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.340 |        0.050 |       -7.370 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.080 |        0.110 |        0.810 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.060 |        0.020 |       -2.540 | **           |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.060 |       48.990 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.860 |        0.060 |       47.050 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        1.720 |        0.090 |       19.770 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |        0.580 |              |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.070 |        0.040 |       -1.790 | *            |
|      sector1 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.460 |        0.060 |        7.500 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 62, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -7027.717479
Log-liklihood ratio: 0.364146
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.630 |        0.090 |        7.020 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.080 |        0.010 |       -7.210 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        3.350 | ***          |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.350 |        0.050 |       -7.810 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.150 |        0.100 |        1.430 | .            |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.040 |        0.020 |       -1.960 | *            |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.050 |       59.840 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        2.490 |        0.060 |       38.380 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        0.710 |        0.120 |        5.900 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.100 |              |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.100 |        0.040 |       -2.490 | **           |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.520 |        0.060 |        8.740 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 71, size = 1149
Null Log-liklihood: -5291.340544
Log-liklihood at convergence: -3656.162837
Log-liklihood ratio: 0.309029
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.410 |        0.110 |        3.790 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.050 |        0.020 |       -3.070 | **           |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        0.850 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.490 |        0.070 |       -7.580 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.140 |        0.120 |       -1.190 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.040 |        0.030 |       -1.350 | .            |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.090 |       32.400 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.080 |       38.600 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.470 |        0.100 |       25.980 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |        0.580 |              |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |            0 |        0.040 |        0.100 |              |
|      sector2 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.750 |        0.080 |        9.390 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 81, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -6265.084355
Log-liklihood ratio: 0.433148
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.530 |        0.100 |        5.500 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.050 |        0.010 |       -3.910 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        0.490 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.290 |        0.050 |       -6.070 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.120 |        0.110 |        1.060 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.020 |        0.020 |       -1.230 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.070 |       43.670 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.060 |       48.810 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.690 |        0.070 |       36.250 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -4.270 | ***          |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |            0 |        0.040 |       -0.050 |              |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.500 |        0.060 |        8.550 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 92, size = 513
Null Log-liklihood: -2362.452305
Log-liklihood at convergence: -1625.032786
Log-liklihood ratio: 0.312142
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.550 |        0.160 |        3.380 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.050 |        0.030 |       -2.030 | *            |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |       -2.540 | **           |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.690 |        0.100 |       -6.960 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.280 |        0.200 |       -1.450 | .            |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.050 |        0.050 |       -0.990 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.110 |       26.680 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        1.540 |        0.180 |        8.720 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        1.770 |        0.160 |       11.400 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -5.620 | ***          |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.020 |        0.060 |       -0.290 |              |
|      sector6 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        1.040 |        0.120 |        8.360 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 7211, size = 575
Null Log-liklihood: -2647.972857
Log-liklihood at convergence: -2245.080579
Log-liklihood ratio: 0.152151
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.860 |        0.130 |        6.540 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.120 |        0.020 |       -5.360 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        3.340 | ***          |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.370 |        0.090 |      -14.960 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.390 |        0.150 |       -2.570 | **           |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.040 |        0.040 |       -0.960 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |        1.610 |        0.170 |        9.710 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |        1.070 |        0.160 |        6.860 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |       -1.110 |        0.380 |       -2.910 | **           |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.430 | .            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |        0.060 |        0.080 |        0.810 |              |
|      sector5 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        1.200 |        0.110 |       10.700 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 7221, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -5441.580702
Log-liklihood ratio: 0.507657
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.720 |        0.090 |        8.080 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.050 |        0.010 |       -3.530 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        1.680 | *            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.360 |        0.040 |       -8.030 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.110 |        0.110 |        0.990 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.040 |        0.020 |       -1.850 | *            |
+--------------+--------------+--------------+--------------+--------------+
|       office |        2.240 |        0.100 |       22.390 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.070 |       41.960 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        0.610 |        0.140 |        4.370 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -8.570 | ***          |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.200 |        0.040 |       -5.070 | ***          |
|      sector4 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.670 |        0.060 |       10.770 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 7222, size = 2400
Null Log-liklihood: -11052.408446
Log-liklihood at convergence: -5125.017508
Log-liklihood ratio: 0.536299
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        0.560 |        0.090 |        6.320 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.050 |        0.010 |       -3.780 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        1.890 | *            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.580 |        0.050 |      -12.520 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.310 |        0.110 |        2.860 | **           |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.020 |        0.020 |       -1.160 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |        2.070 |        0.110 |       18.190 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.080 |       35.670 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |       -0.710 |        0.230 |       -3.080 | **           |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -4.070 | ***          |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.200 |        0.040 |       -5.070 | ***          |
|      sector4 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.430 |        0.070 |        6.480 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 7223, size = 332
Null Log-liklihood: -1528.916502
Log-liklihood at convergence: -851.803299
Log-liklihood ratio: 0.442871
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        1.150 |        0.250 |        4.710 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.030 |        0.030 |       -0.820 |              |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        1.180 |              |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -1.020 |        0.130 |       -7.780 | ***          |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |        0.020 |        0.320 |        0.070 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.030 |        0.060 |       -0.440 |              |
+--------------+--------------+--------------+--------------+--------------+
|       office |            3 |        0.180 |       17.120 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.160 |       18.320 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        2.520 |        0.180 |       13.860 | ***          |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -1.990 | *            |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.200 |        0.140 |       -1.390 | .            |
|      sector5 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.620 |        0.150 |        4.210 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
Estimating parameters for segment = 7224, size = 738
Null Log-liklihood: -3398.615597
Log-liklihood at convergence: -1533.593902
Log-liklihood ratio: 0.548759
+--------------+--------------+--------------+--------------+--------------+
|  Variables   | Coefficient  |    Stderr    |   T-score    | Significance |
+==============+==============+==============+==============+==============+
|      ln jobs |        1.890 |        0.210 |        9.170 | ***          |
| within 30min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln avg |       -0.080 |        0.020 |       -3.270 | ***          |
|  nonres unit |              |              |              |              |
|   price zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  median year |            0 |            0 |        2.210 | *            |
|        built |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|           ln |       -0.230 |        0.090 |       -2.650 | **           |
|  residential |              |              |              |              |
| unit density |              |              |              |              |
|         zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln pop |       -0.120 |        0.240 |       -0.510 |              |
| within 20min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   nonres far |       -0.060 |        0.040 |       -1.480 | .            |
+--------------+--------------+--------------+--------------+--------------+
|       office |        1.600 |        0.210 |        7.440 | ***          |
+--------------+--------------+--------------+--------------+--------------+
|    retail or |            3 |        0.130 |       23.680 | ***          |
|   restaurant |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|   industrial |        0.310 |        0.260 |        1.200 |              |
|     building |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  employees x |            0 |            0 |       -4.130 | ***          |
|       ln non |              |              |              |              |
|  residential |              |              |              |              |
|    sqft zone |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|       ln emp |       -0.290 |        0.090 |       -3.160 | ***          |
|      sector4 |              |              |              |              |
| within 15min |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+
|  rail within |        0.820 |        0.110 |        7.480 | ***          |
|         mile |              |              |              |              |
+--------------+--------------+--------------+--------------+--------------+

RESIDENTIAL REPM ESTIMATION


In [4]:
##Specify independent variables for each segment here.  Each variable must be represented in the variable library.  
##There must be a set of independent variables corresponding to each segment.  
ind_vars2 = ['ln_pop_within_20min','ln_units_per_acre','mean_income','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars3 = ['ln_pop_within_20min','ln_units_per_acre','mean_income','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars20 = ['ln_pop_within_20min','ln_units_per_acre','mean_income','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars24 = ['ln_pop_within_20min','ln_units_per_acre','mean_income','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]

##Apply filters
dset.d['buildings_for_estimation'] = buildings[(buildings.improvement_value>20000)*(np.in1d(buildings.building_type_id,[2,3,20,24]))]

##Esto,ate
regression_model_estimation.estimate(dset,[ind_vars2,ind_vars3,ind_vars20,ind_vars24],depvar_name = 'unit_price_residential',max_segment_size = 9000,estimation_table = 'buildings_for_estimation',
                         output_names=["drcog-coeff-reshedonic-%s.csv","DRCOG RESHEDONIC MODEL (%s)","resprice_%s","resprice"],
                         agents_groupby= ['building_type_id',])


Estimating hedonic for 2 with 9000 observations
                              OLS Regression Results                              
==================================================================================
Dep. Variable:     unit_price_residential   R-squared:                       0.057
Model:                                OLS   Adj. R-squared:                  0.055
Method:                     Least Squares   F-statistic:                     27.11
Date:                    Wed, 23 Apr 2014   Prob (F-statistic):           6.24e-99
Time:                            21:20:17   Log-Likelihood:                -6798.2
No. Observations:                    9000   AIC:                         1.364e+04
Df Residuals:                        8979   BIC:                         1.379e+04
Df Model:                              20                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_pop_within_20min                  0.0464      0.025      1.887      0.059        -0.002     0.095
ln_units_per_acre                    0.0379      0.006      5.930      0.000         0.025     0.050
mean_income                      -2.909e-07   1.81e-07     -1.609      0.108     -6.45e-07  6.35e-08
year_built                           0.0002   4.76e-05      3.678      0.000      8.18e-05     0.000
ln_dist_bus                          0.0111      0.008      1.473      0.141        -0.004     0.026
ln_dist_rail                         0.0187      0.010      1.950      0.051      -9.9e-05     0.037
ln_avg_land_value_per_sqft_zone      0.0384      0.011      3.509      0.000         0.017     0.060
ln_residential_unit_density_zone     0.0379      0.013      2.868      0.004         0.012     0.064
ln_non_residential_sqft_zone        -0.0058      0.001     -4.098      0.000        -0.009    -0.003
allpurpose_agglosum_floor           -0.0326      0.008     -3.928      0.000        -0.049    -0.016
county8001                           0.1716      0.034      5.101      0.000         0.106     0.238
county8005                           0.1864      0.025      7.520      0.000         0.138     0.235
county8013                          -0.0167      0.025     -0.679      0.497        -0.065     0.032
county8014                           0.3227      0.040      8.076      0.000         0.244     0.401
county8019                           0.1952      0.044      4.432      0.000         0.109     0.282
county8035                           0.3490      0.037      9.324      0.000         0.276     0.422
county8039                           0.5916      0.232      2.554      0.011         0.137     1.046
county8047                           0.1810      0.073      2.468      0.014         0.037     0.325
county8059                           0.0047      0.025      0.183      0.855        -0.045     0.055
county8123                           0.1414      0.029      4.915      0.000         0.085     0.198
const                                9.9937      0.379     26.385      0.000         9.251    10.736
==============================================================================
Omnibus:                     1640.993   Durbin-Watson:                   2.054
Prob(Omnibus):                  0.000   Jarque-Bera (JB):            17531.001
Skew:                          -0.557   Prob(JB):                         0.00
Kurtosis:                       9.746   Cond. No.                     6.77e+06
==============================================================================

The condition number is large, 6.77e+06. This might indicate that there are
strong multicollinearity or other numerical problems.
 
Estimating hedonic for 3 with 9000 observations
                              OLS Regression Results                              
==================================================================================
Dep. Variable:     unit_price_residential   R-squared:                       0.301
Model:                                OLS   Adj. R-squared:                  0.299
Method:                     Least Squares   F-statistic:                     193.0
Date:                    Wed, 23 Apr 2014   Prob (F-statistic):               0.00
Time:                            21:20:18   Log-Likelihood:                -7215.6
No. Observations:                    9000   AIC:                         1.447e+04
Df Residuals:                        8979   BIC:                         1.462e+04
Df Model:                              20                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_pop_within_20min                  0.1299      0.025      5.226      0.000         0.081     0.179
ln_units_per_acre                    0.0264      0.009      2.784      0.005         0.008     0.045
mean_income                       2.488e-07   2.14e-07      1.160      0.246     -1.71e-07  6.69e-07
year_built                           0.0015      0.000     11.788      0.000         0.001     0.002
ln_dist_bus                          0.0777      0.007     10.857      0.000         0.064     0.092
ln_dist_rail                        -0.0977      0.010     -9.650      0.000        -0.118    -0.078
ln_avg_land_value_per_sqft_zone      0.3771      0.013     28.042      0.000         0.351     0.403
ln_residential_unit_density_zone     0.0115      0.013      0.870      0.385        -0.014     0.037
ln_non_residential_sqft_zone        -0.0042      0.001     -3.226      0.001        -0.007    -0.002
allpurpose_agglosum_floor           -0.1232      0.009    -14.457      0.000        -0.140    -0.106
county8001                           0.2326      0.033      7.101      0.000         0.168     0.297
county8005                          -0.2821      0.026    -10.720      0.000        -0.334    -0.231
county8013                          -0.2048      0.031     -6.550      0.000        -0.266    -0.144
county8014                          -0.1320      0.082     -1.619      0.105        -0.292     0.028
county8019                          -0.3133      0.085     -3.676      0.000        -0.480    -0.146
county8035                           0.1301      0.034      3.771      0.000         0.062     0.198
county8039                          -0.4257      0.048     -8.803      0.000        -0.520    -0.331
county8047                           0.2838      0.077      3.675      0.000         0.132     0.435
county8059                           0.0463      0.035      1.306      0.192        -0.023     0.116
county8123                          -0.1657      0.029     -5.661      0.000        -0.223    -0.108
const                                8.1426      0.435     18.739      0.000         7.291     8.994
==============================================================================
Omnibus:                     1102.347   Durbin-Watson:                   1.993
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             5166.242
Skew:                          -0.513   Prob(JB):                         0.00
Kurtosis:                       6.567   Cond. No.                     7.49e+06
==============================================================================

The condition number is large, 7.49e+06. This might indicate that there are
strong multicollinearity or other numerical problems.
 
Estimating hedonic for 20 with 9000 observations
                              OLS Regression Results                              
==================================================================================
Dep. Variable:     unit_price_residential   R-squared:                       0.257
Model:                                OLS   Adj. R-squared:                  0.256
Method:                     Least Squares   F-statistic:                     163.7
Date:                    Wed, 23 Apr 2014   Prob (F-statistic):               0.00
Time:                            21:20:18   Log-Likelihood:                -6748.0
No. Observations:                    9000   AIC:                         1.354e+04
Df Residuals:                        8980   BIC:                         1.368e+04
Df Model:                              19                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_pop_within_20min                  0.0368      0.011      3.384      0.001         0.015     0.058
ln_units_per_acre                   -0.0149      0.006     -2.424      0.015        -0.027    -0.003
mean_income                      -2.483e-07    1.9e-07     -1.304      0.192     -6.21e-07  1.25e-07
year_built                           0.0017      0.000     16.091      0.000         0.002     0.002
ln_dist_bus                          0.0695      0.006     11.581      0.000         0.058     0.081
ln_dist_rail                        -0.0606      0.011     -5.434      0.000        -0.082    -0.039
ln_avg_land_value_per_sqft_zone      0.3363      0.011     29.825      0.000         0.314     0.358
ln_residential_unit_density_zone    -0.1739      0.013    -13.655      0.000        -0.199    -0.149
ln_non_residential_sqft_zone         0.0165      0.001     11.471      0.000         0.014     0.019
allpurpose_agglosum_floor           -0.0507      0.008     -6.116      0.000        -0.067    -0.034
county8001                           0.0482      0.023      2.057      0.040         0.002     0.094
county8005                           0.3519      0.022     15.964      0.000         0.309     0.395
county8013                          -0.0819      0.024     -3.429      0.001        -0.129    -0.035
county8014                           0.1332      0.041      3.241      0.001         0.053     0.214
county8019                           0.2301      0.044      5.286      0.000         0.145     0.315
county8035                           0.0875      0.024      3.695      0.000         0.041     0.134
county8039                       -1.766e-16   3.17e-16     -0.557      0.577     -7.98e-16  4.44e-16
county8047                          -0.0204      0.067     -0.303      0.762        -0.152     0.111
county8059                          -0.2986      0.022    -13.362      0.000        -0.342    -0.255
county8123                           0.0644      0.035      1.858      0.063        -0.004     0.132
const                                8.1411      0.272     29.965      0.000         7.609     8.674
==============================================================================
Omnibus:                      668.263   Durbin-Watson:                   2.013
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             3382.548
Skew:                           0.147   Prob(JB):                         0.00
Kurtosis:                       5.989   Cond. No.                          nan
==============================================================================

The smallest eigenvalue is -4.26e-14. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 
Estimating hedonic for 24 with 9000 observations
                              OLS Regression Results                              
==================================================================================
Dep. Variable:     unit_price_residential   R-squared:                       0.382
Model:                                OLS   Adj. R-squared:                  0.380
Method:                     Least Squares   F-statistic:                     291.8
Date:                    Wed, 23 Apr 2014   Prob (F-statistic):               0.00
Time:                            21:20:19   Log-Likelihood:                -5355.0
No. Observations:                    9000   AIC:                         1.075e+04
Df Residuals:                        8980   BIC:                         1.089e+04
Df Model:                              19                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_pop_within_20min                  0.0250      0.015      1.684      0.092        -0.004     0.054
ln_units_per_acre                   -0.0041      0.004     -1.081      0.280        -0.012     0.003
mean_income                      -4.844e-07   1.62e-07     -2.983      0.003     -8.03e-07 -1.66e-07
year_built                           0.0036      0.000     33.834      0.000         0.003     0.004
ln_dist_bus                          0.0563      0.006     10.103      0.000         0.045     0.067
ln_dist_rail                        -0.1071      0.009    -11.433      0.000        -0.125    -0.089
ln_avg_land_value_per_sqft_zone      0.4005      0.010     42.154      0.000         0.382     0.419
ln_residential_unit_density_zone    -0.0924      0.010     -8.976      0.000        -0.113    -0.072
ln_non_residential_sqft_zone         0.0051      0.001      4.115      0.000         0.003     0.007
allpurpose_agglosum_floor           -0.0788      0.008     -9.844      0.000        -0.095    -0.063
county8001                          -0.2043      0.020    -10.256      0.000        -0.243    -0.165
county8005                           0.1428      0.021      6.816      0.000         0.102     0.184
county8013                          -0.3024      0.026    -11.488      0.000        -0.354    -0.251
county8014                          -0.0908      0.029     -3.102      0.002        -0.148    -0.033
county8019                           0.0047      0.028      0.165      0.869        -0.051     0.060
county8035                           0.2574      0.026      9.776      0.000         0.206     0.309
county8039                       -1.282e-15   1.28e-16     -9.985      0.000     -1.53e-15 -1.03e-15
county8047                           0.3547      0.254      1.397      0.163        -0.143     0.853
county8059                           0.1434      0.022      6.579      0.000         0.101     0.186
county8123                           0.1363      0.030      4.549      0.000         0.078     0.195
const                                5.0830      0.318     16.009      0.000         4.461     5.705
==============================================================================
Omnibus:                     1415.319   Durbin-Watson:                   2.006
Prob(Omnibus):                  0.000   Jarque-Bera (JB):            20883.970
Skew:                           0.261   Prob(JB):                         0.00
Kurtosis:                      10.444   Cond. No.                          nan
==============================================================================

The smallest eigenvalue is -2.89e-14. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 

NON-RESIDENTIAL REPM ESTIMATION


In [5]:
##Specify independent variables for each segment here.  Each variable must be represented in the variable library.  
##There must be a set of independent variables corresponding to each segment.  
ind_vars5 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars8 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars9 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars11 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars16 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars17 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars18 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars21 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars22 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]
ind_vars23 = ['ln_jobs_within_20min','nonres_far','year_built','ln_dist_bus','ln_dist_rail','ln_avg_land_value_per_sqft_zone','ln_residential_unit_density_zone','ln_non_residential_sqft_zone','allpurpose_agglosum_floor','county8001', 'county8005', 'county8013', 'county8014', 'county8019', 'county8035', 'county8039', 'county8047', 'county8059', 'county8123',]

##Apply filters
dset.d['buildings_for_estimation'] = buildings[(buildings.improvement_value>10000)*(np.in1d(buildings.building_type_id,[5,8,11,16,17,18,21,23,9,22]))]

##Estimate
regression_model_estimation.estimate(dset,[ind_vars5,ind_vars8,ind_vars9,ind_vars11,ind_vars16,ind_vars17,ind_vars18,ind_vars21,ind_vars22,ind_vars23],
                                     depvar_name = 'unit_price_non_residential',max_segment_size = 9000,estimation_table = 'buildings_for_estimation',
                                     output_names=["drcog-coeff-nrhedonic-%s.csv","DRCOG NRHEDONIC MODEL (%s)","nrprice_%s","nrprice"],
                                     agents_groupby= ['building_type_id',])


Estimating hedonic for 5 with 6565 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.202
Model:                                    OLS   Adj. R-squared:                  0.200
Method:                         Least Squares   F-statistic:                     87.28
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):          8.43e-303
Time:                                21:20:19   Log-Likelihood:                -7558.3
No. Observations:                        6565   AIC:                         1.516e+04
Df Residuals:                            6545   BIC:                         1.529e+04
Df Model:                                  19                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.0265      0.017      1.545      0.122        -0.007     0.060
nonres_far                          -0.0055      0.009     -0.637      0.524        -0.022     0.011
year_built                          -0.0001   3.36e-05     -3.569      0.000        -0.000  -5.4e-05
ln_dist_bus                         -0.0386      0.010     -4.067      0.000        -0.057    -0.020
ln_dist_rail                        -0.0338      0.014     -2.370      0.018        -0.062    -0.006
ln_avg_land_value_per_sqft_zone      0.0741      0.016      4.773      0.000         0.044     0.105
ln_residential_unit_density_zone    -0.0584      0.023     -2.561      0.010        -0.103    -0.014
ln_non_residential_sqft_zone         0.0122      0.002      5.419      0.000         0.008     0.017
allpurpose_agglosum_floor            0.0022      0.003      0.647      0.518        -0.004     0.009
county8001                           0.1789      0.044      4.068      0.000         0.093     0.265
county8005                          -0.3193      0.045     -7.155      0.000        -0.407    -0.232
county8013                          -0.5008      0.041    -12.156      0.000        -0.582    -0.420
county8014                          -1.7454      0.086    -20.343      0.000        -1.914    -1.577
county8019                          -0.0162      0.083     -0.196      0.845        -0.178     0.146
county8035                           0.3053      0.046      6.660      0.000         0.215     0.395
county8039                          -2.3532      0.090    -26.048      0.000        -2.530    -2.176
county8047                           0.2368      0.069      3.454      0.001         0.102     0.371
county8059                          -0.0882      0.042     -2.106      0.035        -0.170    -0.006
county8123                          -0.0936      0.059     -1.579      0.114        -0.210     0.023
const                                4.5560      0.314     14.493      0.000         3.940     5.172
==============================================================================
Omnibus:                      731.644   Durbin-Watson:                   1.346
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             5866.713
Skew:                          -0.216   Prob(JB):                         0.00
Kurtosis:                       7.611   Cond. No.                     6.53e+04
==============================================================================

The condition number is large, 6.53e+04. This might indicate that there are
strong multicollinearity or other numerical problems.
 
Estimating hedonic for 8 with 797 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.140
Model:                                    OLS   Adj. R-squared:                  0.119
Method:                         Least Squares   F-statistic:                     6.682
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):           1.82e-16
Time:                                21:20:19   Log-Likelihood:                -816.25
No. Observations:                         797   AIC:                             1673.
Df Residuals:                             777   BIC:                             1766.
Df Model:                                  19                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.0558      0.053      1.046      0.296        -0.049     0.161
nonres_far                           0.0237      0.031      0.774      0.439        -0.036     0.084
year_built                           0.0081      0.001      7.402      0.000         0.006     0.010
ln_dist_bus                          0.0101      0.025      0.401      0.688        -0.039     0.060
ln_dist_rail                        -0.0226      0.051     -0.440      0.660        -0.123     0.078
ln_avg_land_value_per_sqft_zone     -0.0059      0.049     -0.121      0.904        -0.102     0.090
ln_residential_unit_density_zone    -0.1090      0.063     -1.720      0.086        -0.233     0.015
ln_non_residential_sqft_zone         0.0132      0.006      2.109      0.035         0.001     0.025
allpurpose_agglosum_floor            0.0258      0.020      1.302      0.193        -0.013     0.065
county8001                           0.2187      0.107      2.051      0.041         0.009     0.428
county8005                           0.6503      0.488      1.332      0.183        -0.308     1.609
county8013                           0.0027      0.105      0.025      0.980        -0.203     0.209
county8014                          -0.0522      0.205     -0.254      0.799        -0.455     0.351
county8019                          -0.0599      0.234     -0.256      0.798        -0.519     0.399
county8035                           0.2604      0.101      2.578      0.010         0.062     0.459
county8039                           1.1687      0.686      1.704      0.089        -0.178     2.515
county8047                          -0.2607      0.353     -0.738      0.461        -0.954     0.433
county8059                           0.2141      0.119      1.803      0.072        -0.019     0.447
county8123                           0.7104      0.111      6.395      0.000         0.492     0.929
const                              -12.4483      2.478     -5.023      0.000       -17.314    -7.583
==============================================================================
Omnibus:                      105.027   Durbin-Watson:                   1.766
Prob(Omnibus):                  0.000   Jarque-Bera (JB):              950.414
Skew:                          -0.193   Prob(JB):                    4.17e-207
Kurtosis:                       8.336   Cond. No.                     2.03e+05
==============================================================================

The condition number is large, 2.03e+05. This might indicate that there are
strong multicollinearity or other numerical problems.
 
Estimating hedonic for 9 with 2279 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.112
Model:                                    OLS   Adj. R-squared:                  0.105
Method:                         Least Squares   F-statistic:                     15.85
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):           8.36e-47
Time:                                21:20:19   Log-Likelihood:                -3297.2
No. Observations:                        2279   AIC:                             6632.
Df Residuals:                            2260   BIC:                             6741.
Df Model:                                  18                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.1563      0.045      3.483      0.001         0.068     0.244
nonres_far                          -0.0161      0.020     -0.814      0.416        -0.055     0.023
year_built                          -0.0002      0.000     -1.103      0.270        -0.001     0.000
ln_dist_bus                          0.0291      0.024      1.199      0.231        -0.019     0.077
ln_dist_rail                        -0.0303      0.042     -0.718      0.473        -0.113     0.052
ln_avg_land_value_per_sqft_zone      0.1554      0.041      3.803      0.000         0.075     0.235
ln_residential_unit_density_zone    -0.2886      0.066     -4.348      0.000        -0.419    -0.158
ln_non_residential_sqft_zone         0.0168      0.005      3.369      0.001         0.007     0.027
allpurpose_agglosum_floor           -0.0067      0.007     -1.010      0.313        -0.020     0.006
county8001                           0.1496      0.093      1.612      0.107        -0.032     0.332
county8005                          -0.4921      0.180     -2.737      0.006        -0.845    -0.139
county8013                          -0.1211      0.094     -1.286      0.199        -0.306     0.064
county8014                           0.8756      0.293      2.986      0.003         0.300     1.451
county8019                           2.0874      0.234      8.907      0.000         1.628     2.547
county8035                           0.3808      0.103      3.694      0.000         0.179     0.583
county8039                        5.999e-16   9.68e-16      0.620      0.535      -1.3e-15   2.5e-15
county8047                           0.0750      0.133      0.563      0.574        -0.187     0.337
county8059                          -0.2214      0.126     -1.762      0.078        -0.468     0.025
county8123                           1.4156      0.208      6.793      0.000         1.007     1.824
const                                2.0081      0.919      2.186      0.029         0.206     3.810
==============================================================================
Omnibus:                      255.961   Durbin-Watson:                   1.046
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             2172.788
Skew:                          -0.142   Prob(JB):                         0.00
Kurtosis:                       7.775   Cond. No.                          nan
==============================================================================

The smallest eigenvalue is -1.78e-15. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 
Estimating hedonic for 11 with 913 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.091
Model:                                    OLS   Adj. R-squared:                  0.073
Method:                         Least Squares   F-statistic:                     5.242
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):           3.72e-11
Time:                                21:20:19   Log-Likelihood:                -1035.2
No. Observations:                         913   AIC:                             2106.
Df Residuals:                             895   BIC:                             2193.
Df Model:                                  17                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.0065      0.032      0.203      0.839        -0.057     0.070
nonres_far                           0.0182      0.024      0.768      0.443        -0.028     0.065
year_built                          -0.0006      0.000     -2.215      0.027        -0.001  -6.7e-05
ln_dist_bus                         -0.0572      0.025     -2.274      0.023        -0.107    -0.008
ln_dist_rail                        -0.0888      0.044     -2.027      0.043        -0.175    -0.003
ln_avg_land_value_per_sqft_zone      0.0955      0.034      2.796      0.005         0.028     0.163
ln_residential_unit_density_zone    -0.0159      0.063     -0.254      0.799        -0.139     0.107
ln_non_residential_sqft_zone         0.0070      0.006      1.231      0.219        -0.004     0.018
allpurpose_agglosum_floor           -0.0280      0.013     -2.106      0.035        -0.054    -0.002
county8001                          -0.0410      0.102     -0.403      0.687        -0.240     0.158
county8005                          -0.4825      0.207     -2.333      0.020        -0.888    -0.077
county8013                          -0.6442      0.210     -3.064      0.002        -1.057    -0.232
county8014                          -0.3896      0.772     -0.505      0.614        -1.905     1.126
county8019                       -1.969e-15   2.97e-16     -6.639      0.000     -2.55e-15 -1.39e-15
county8035                           0.1040      0.407      0.256      0.798        -0.694     0.902
county8039                          -0.0305      0.766     -0.040      0.968        -1.533     1.472
county8047                        2.309e-16   2.07e-16      1.115      0.265     -1.75e-16  6.37e-16
county8059                          -0.0827      0.183     -0.452      0.651        -0.441     0.276
county8123                           0.2390      0.358      0.668      0.504        -0.463     0.941
const                                6.4460      0.930      6.931      0.000         4.621     8.271
==============================================================================
Omnibus:                      137.944   Durbin-Watson:                   1.338
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             1167.654
Skew:                           0.392   Prob(JB):                    2.80e-254
Kurtosis:                       8.484   Cond. No.                     3.63e+12
==============================================================================

The smallest eigenvalue is 2.69e-16. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 
Estimating hedonic for 16 with 1314 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.062
Model:                                    OLS   Adj. R-squared:                  0.049
Method:                         Least Squares   F-statistic:                     4.722
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):           2.73e-10
Time:                                21:20:19   Log-Likelihood:                -2297.8
No. Observations:                        1314   AIC:                             4634.
Df Residuals:                            1295   BIC:                             4732.
Df Model:                                  18                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.1424      0.059      2.414      0.016         0.027     0.258
nonres_far                          -0.0362      0.045     -0.798      0.425        -0.125     0.053
year_built                          -0.0001      0.000     -0.668      0.504        -0.000     0.000
ln_dist_bus                         -0.0052      0.038     -0.137      0.891        -0.080     0.070
ln_dist_rail                         0.1418      0.061      2.342      0.019         0.023     0.261
ln_avg_land_value_per_sqft_zone      0.1422      0.062      2.282      0.023         0.020     0.264
ln_residential_unit_density_zone     0.4142      0.091      4.568      0.000         0.236     0.592
ln_non_residential_sqft_zone        -0.0278      0.009     -3.010      0.003        -0.046    -0.010
allpurpose_agglosum_floor           -0.0553      0.016     -3.383      0.001        -0.087    -0.023
county8001                           0.0718      0.185      0.389      0.697        -0.290     0.434
county8005                          -0.3492      0.199     -1.754      0.080        -0.740     0.041
county8013                          -0.4148      0.169     -2.449      0.014        -0.747    -0.083
county8014                           0.1372      0.219      0.628      0.530        -0.292     0.566
county8019                          -0.2942      0.192     -1.534      0.125        -0.670     0.082
county8035                           0.5077      0.145      3.496      0.000         0.223     0.793
county8039                        1.048e-15    7.6e-16      1.379      0.168     -4.43e-16  2.54e-15
county8047                           0.3128      0.473      0.661      0.509        -0.616     1.242
county8059                          -0.0944      0.177     -0.534      0.593        -0.441     0.252
county8123                           0.1851      0.228      0.810      0.418        -0.263     0.633
const                                1.5430      1.180      1.308      0.191        -0.772     3.858
==============================================================================
Omnibus:                      711.621   Durbin-Watson:                   1.604
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             6893.176
Skew:                           2.336   Prob(JB):                         0.00
Kurtosis:                      13.202   Cond. No.                          nan
==============================================================================

The smallest eigenvalue is -1.95e-14. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 
Estimating hedonic for 17 with 2187 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.153
Model:                                    OLS   Adj. R-squared:                  0.146
Method:                         Least Squares   F-statistic:                     21.71
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):           1.48e-65
Time:                                21:20:20   Log-Likelihood:                -2244.8
No. Observations:                        2187   AIC:                             4528.
Df Residuals:                            2168   BIC:                             4636.
Df Model:                                  18                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.0624      0.029      2.170      0.030         0.006     0.119
nonres_far                           0.0208      0.013      1.654      0.098        -0.004     0.045
year_built                           0.0074      0.001     12.949      0.000         0.006     0.009
ln_dist_bus                         -0.0448      0.014     -3.219      0.001        -0.072    -0.018
ln_dist_rail                         0.0454      0.021      2.182      0.029         0.005     0.086
ln_avg_land_value_per_sqft_zone      0.0437      0.025      1.742      0.082        -0.006     0.093
ln_residential_unit_density_zone     0.0036      0.038      0.097      0.923        -0.070     0.078
ln_non_residential_sqft_zone         0.0065      0.004      1.788      0.074        -0.001     0.014
allpurpose_agglosum_floor           -0.0070      0.006     -1.212      0.226        -0.018     0.004
county8001                          -0.3642      0.069     -5.270      0.000        -0.500    -0.229
county8005                          -0.2097      0.063     -3.313      0.001        -0.334    -0.086
county8013                          -0.4965      0.064     -7.767      0.000        -0.622    -0.371
county8014                          -0.2981      0.097     -3.061      0.002        -0.489    -0.107
county8019                          -0.3223      0.135     -2.390      0.017        -0.587    -0.058
county8035                           0.1271      0.067      1.885      0.060        -0.005     0.259
county8039                       -5.999e-16   1.14e-16     -5.273      0.000     -8.23e-16 -3.77e-16
county8047                          -0.3667      0.117     -3.137      0.002        -0.596    -0.137
county8059                          -0.0810      0.054     -1.508      0.132        -0.186     0.024
county8123                           0.0815      0.088      0.925      0.355        -0.091     0.254
const                              -10.9719      1.195     -9.181      0.000       -13.315    -8.628
==============================================================================
Omnibus:                      323.261   Durbin-Watson:                   1.682
Prob(Omnibus):                  0.000   Jarque-Bera (JB):              685.362
Skew:                          -0.874   Prob(JB):                    1.50e-149
Kurtosis:                       5.114   Cond. No.                          nan
==============================================================================

The smallest eigenvalue is -1.78e-15. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 
Estimating hedonic for 18 with 9000 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.129
Model:                                    OLS   Adj. R-squared:                  0.127
Method:                         Least Squares   F-statistic:                     73.95
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):          9.63e-253
Time:                                21:20:20   Log-Likelihood:                -10446.
No. Observations:                        9000   AIC:                         2.093e+04
Df Residuals:                            8981   BIC:                         2.106e+04
Df Model:                                  18                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.0851      0.015      5.569      0.000         0.055     0.115
nonres_far                           0.0207      0.007      2.928      0.003         0.007     0.035
year_built                           0.0002   9.22e-05      2.326      0.020      3.37e-05     0.000
ln_dist_bus                         -0.0451      0.008     -5.894      0.000        -0.060    -0.030
ln_dist_rail                         0.0377      0.013      2.924      0.003         0.012     0.063
ln_avg_land_value_per_sqft_zone      0.0518      0.015      3.570      0.000         0.023     0.080
ln_residential_unit_density_zone    -0.0723      0.020     -3.679      0.000        -0.111    -0.034
ln_non_residential_sqft_zone         0.0073      0.002      3.577      0.000         0.003     0.011
allpurpose_agglosum_floor           -0.0240      0.004     -6.662      0.000        -0.031    -0.017
county8001                          -0.0534      0.038     -1.394      0.163        -0.128     0.022
county8005                          -0.3027      0.034     -8.859      0.000        -0.370    -0.236
county8013                          -0.5231      0.029    -17.798      0.000        -0.581    -0.466
county8014                          -0.0306      0.054     -0.571      0.568        -0.136     0.074
county8019                           0.0122      0.063      0.193      0.847        -0.112     0.136
county8035                           0.5658      0.036     15.724      0.000         0.495     0.636
county8039                        3.027e-16   3.23e-17      9.360      0.000      2.39e-16  3.66e-16
county8047                           0.1650      0.070      2.356      0.019         0.028     0.302
county8059                           0.1161      0.032      3.602      0.000         0.053     0.179
county8123                           0.3186      0.049      6.546      0.000         0.223     0.414
const                                2.6637      0.324      8.210      0.000         2.028     3.300
==============================================================================
Omnibus:                     1052.348   Durbin-Watson:                   2.013
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             8341.599
Skew:                          -0.274   Prob(JB):                         0.00
Kurtosis:                       7.684   Cond. No.                          nan
==============================================================================

The smallest eigenvalue is -1.24e-14. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 
Estimating hedonic for 21 with 860 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.203
Model:                                    OLS   Adj. R-squared:                  0.189
Method:                         Least Squares   F-statistic:                     14.30
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):           6.67e-33
Time:                                21:20:20   Log-Likelihood:                -1316.7
No. Observations:                         860   AIC:                             2665.
Df Residuals:                             844   BIC:                             2742.
Df Model:                                  15                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.1151      0.062      1.856      0.064        -0.007     0.237
nonres_far                          -0.0577      0.031     -1.870      0.062        -0.118     0.003
year_built                           0.0001      0.000      0.304      0.762        -0.001     0.001
ln_dist_bus                         -0.1501      0.052     -2.866      0.004        -0.253    -0.047
ln_dist_rail                        -0.2392      0.122     -1.959      0.050        -0.479     0.000
ln_avg_land_value_per_sqft_zone      0.1760      0.080      2.206      0.028         0.019     0.333
ln_residential_unit_density_zone    -0.0712      0.104     -0.686      0.493        -0.275     0.132
ln_non_residential_sqft_zone        -0.0019      0.011     -0.171      0.864        -0.023     0.020
allpurpose_agglosum_floor           -0.0587      0.050     -1.166      0.244        -0.158     0.040
county8001                          -1.0987      0.187     -5.885      0.000        -1.465    -0.732
county8005                        3.768e-15   6.91e-16      5.450      0.000      2.41e-15  5.13e-15
county8013                          -1.0808      0.216     -5.015      0.000        -1.504    -0.658
county8014                          -1.1031      0.379     -2.914      0.004        -1.846    -0.360
county8019                          -0.3798      0.519     -0.732      0.465        -1.399     0.639
county8035                          -0.1803      0.190     -0.951      0.342        -0.552     0.192
county8039                        1.971e-16   4.63e-17      4.259      0.000      1.06e-16  2.88e-16
county8047                                0          0        nan        nan             0         0
county8059                          -1.2881      0.810     -1.590      0.112        -2.878     0.302
county8123                                0          0        nan        nan             0         0
const                                6.9916      1.620      4.315      0.000         3.811    10.172
==============================================================================
Omnibus:                      584.657   Durbin-Watson:                   1.298
Prob(Omnibus):                  0.000   Jarque-Bera (JB):            13214.034
Skew:                           2.745   Prob(JB):                         0.00
Kurtosis:                      21.402   Cond. No.                          inf
==============================================================================

The smallest eigenvalue is      0. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 
Estimating hedonic for 22 with 9000 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.075
Model:                                    OLS   Adj. R-squared:                  0.073
Method:                         Least Squares   F-statistic:                     38.05
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):          2.54e-135
Time:                                21:20:20   Log-Likelihood:                -9583.1
No. Observations:                        9000   AIC:                         1.921e+04
Df Residuals:                            8980   BIC:                         1.935e+04
Df Model:                                  19                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.0421      0.011      3.667      0.000         0.020     0.065
nonres_far                           0.0280      0.006      4.701      0.000         0.016     0.040
year_built                           0.0009      0.000      6.315      0.000         0.001     0.001
ln_dist_bus                         -0.0288      0.007     -3.887      0.000        -0.043    -0.014
ln_dist_rail                        -0.0585      0.012     -5.047      0.000        -0.081    -0.036
ln_avg_land_value_per_sqft_zone      0.0289      0.017      1.673      0.094        -0.005     0.063
ln_residential_unit_density_zone     0.0067      0.021      0.319      0.750        -0.035     0.048
ln_non_residential_sqft_zone        -0.0010      0.002     -0.607      0.544        -0.004     0.002
allpurpose_agglosum_floor           -0.0103      0.002     -4.580      0.000        -0.015    -0.006
county8001                          -0.0398      0.039     -1.024      0.306        -0.116     0.036
county8005                          -0.5662      0.033    -17.280      0.000        -0.630    -0.502
county8013                          -0.2340      0.026     -8.957      0.000        -0.285    -0.183
county8014                          -0.2221      0.095     -2.332      0.020        -0.409    -0.035
county8019                          -0.1346      0.100     -1.345      0.179        -0.331     0.062
county8035                           0.0750      0.037      2.041      0.041         0.003     0.147
county8039                          -0.9288      0.204     -4.554      0.000        -1.329    -0.529
county8047                          -0.4396      0.092     -4.801      0.000        -0.619    -0.260
county8059                          -0.1030      0.027     -3.833      0.000        -0.156    -0.050
county8123                           0.1730      0.066      2.620      0.009         0.044     0.303
const                                2.1378      0.367      5.828      0.000         1.419     2.857
==============================================================================
Omnibus:                     1126.220   Durbin-Watson:                   1.980
Prob(Omnibus):                  0.000   Jarque-Bera (JB):            11253.598
Skew:                          -0.210   Prob(JB):                         0.00
Kurtosis:                       8.462   Cond. No.                     9.82e+04
==============================================================================

The condition number is large, 9.82e+04. This might indicate that there are
strong multicollinearity or other numerical problems.
 
Estimating hedonic for 23 with 689 observations
                                OLS Regression Results                                
======================================================================================
Dep. Variable:     unit_price_non_residential   R-squared:                       0.449
Model:                                    OLS   Adj. R-squared:                  0.434
Method:                         Least Squares   F-statistic:                     30.35
Date:                        Wed, 23 Apr 2014   Prob (F-statistic):           1.34e-74
Time:                                21:20:20   Log-Likelihood:                -803.30
No. Observations:                         689   AIC:                             1645.
Df Residuals:                             670   BIC:                             1731.
Df Model:                                  18                                         
====================================================================================================
                                       coef    std err          t      P>|t|      [95.0% Conf. Int.]
----------------------------------------------------------------------------------------------------
ln_jobs_within_20min                 0.0383      0.032      1.213      0.226        -0.024     0.100
nonres_far                           0.1071      0.036      2.996      0.003         0.037     0.177
year_built                           0.0002      0.000      1.100      0.272        -0.000     0.001
ln_dist_bus                          0.0306      0.028      1.093      0.275        -0.024     0.085
ln_dist_rail                         0.0364      0.042      0.862      0.389        -0.047     0.119
ln_avg_land_value_per_sqft_zone      0.1934      0.051      3.798      0.000         0.093     0.293
ln_residential_unit_density_zone     0.0125      0.091      0.137      0.891        -0.166     0.191
ln_non_residential_sqft_zone        -0.0127      0.008     -1.551      0.121        -0.029     0.003
allpurpose_agglosum_floor           -0.0270      0.008     -3.184      0.002        -0.044    -0.010
county8001                           0.2426      0.117      2.078      0.038         0.013     0.472
county8005                          -0.2601      0.161     -1.614      0.107        -0.577     0.056
county8013                          -0.2939      0.119     -2.466      0.014        -0.528    -0.060
county8014                          -0.5015      0.562     -0.893      0.372        -1.605     0.602
county8019                          -0.4875      0.232     -2.100      0.036        -0.943    -0.032
county8035                          -0.0961      0.177     -0.543      0.587        -0.443     0.251
county8039                       -1.281e-15   1.49e-16     -8.616      0.000     -1.57e-15 -9.89e-16
county8047                           5.8298      0.306     19.072      0.000         5.230     6.430
county8059                          -0.4072      0.108     -3.763      0.000        -0.620    -0.195
county8123                          -0.7426      0.270     -2.746      0.006        -1.274    -0.212
const                                2.5424      0.737      3.448      0.001         1.095     3.990
==============================================================================
Omnibus:                      206.383   Durbin-Watson:                   1.542
Prob(Omnibus):                  0.000   Jarque-Bera (JB):             1329.888
Skew:                          -1.177   Prob(JB):                    1.65e-289
Kurtosis:                       9.386   Cond. No.                     1.40e+12
==============================================================================

The smallest eigenvalue is 1.36e-15. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.
 

Coefficients to HDF5


In [6]:
#COEFFICIENTS TO HDF5
coeff_store_path = os.path.join(misc.data_dir(),'coeffs.h5')
coeff_store = pd.HDFStore(coeff_store_path)
coeff_store['coeffs'] = dset.coeffs
coeff_store.close()