Trip_Generation

Trip Generation Models in TransCAD
Murtaza Haider
[email protected]
Tel: 416.979.5000, ext. 2480
Outline
• TransCAD’s use for
– Basic tabulations
– Statistical analysis
– Trip generation models
Tabulations and Statistics
• Goal: understand TransCAD’s statistical analysis
tools and how you can use them to:
– Generate summary statistics
– Perform tabulations and cross-tabulations
– Determine correlations between variables
– Create, estimate and evaluate linear regression and binary
logit models
– Calculate spatial autocorrelation
Basics: Statistics
• Definition: A branch of mathematics dealing with
the collection, analysis, interpretation and
presentation of masses of numerical data. In
TransCAD, a range of statistical methods are
available.
Basics: Tabulation
• Definition: A classification of records or features in
a layer based on the values for either one or two
data fields.
Example: One-Way Tabulation
Example: Two-Way Tabulations
Quick Start: Calculating Summary Statistics
• Choose File-Close All, then choose File-Open or
click
on the toolbar.
• Open the DBASE file CUSTOMER.DBF in the
TCW\TUTORIAL directory. TransCAD opens a
customer sales database.
• Choose Dataview-Statistics. TransCAD calculates
the summary statistics for the dataview.
Getting Ready for a One-Way Tabulation
• Choose File-Close All, then choose File-Open or
click on the toolbar.
• Open the DBASE file BUS_SURV.DBF in the
TCW\EXERCISE directory. TransCAD displays a
survey taken from transit riders.
• Choose Statistics-Tabulations. TransCAD displays
the Tabulations dialog box.
• Choose AGE in the Field 1 drop-down list.
Performing a One-Way Tabulation
• All the other settings are correct. Click OK.
• Enter MYTAB as the output filename and click OK.
TransCAD creates a tabulation on the AGE field
and displays a matrix containing the age
distribution.
• Make the BUS_SURV dataview the active window.
• Choose Statistics-Tabulations again.
Performing a Two-Way Tabulation
• For HH_SIZE from the Field 1 drop-down list and
AUTOS from the Field 2 drop-down list.
• Choose List of Values from both Methods dropdown lists, and 5 from both # Classes drop-down
lists.
• Enter MYTAB2 as the output filename and click
OK. TransCAD produces a two-way tabulation of
AUTOS and HH_SIZE.
In Depth: Tabulations
• Choose Statistics-Tabulations to display the
Tabulations dialog box:
Basics: Correlation
• Definition: A calculated statistic that determines the
interdependence between mathematical variables.
The calculated correlation can range from 1
(perfectly positively correlated) through 0 (no
correlation) to -1 (perfectly negatively correlated)
Example: Correlation
Positive Correlation
Negative Correlation
No Correlation
Getting Ready to Calculate Correlations
• Choose File-Close All, then choose File-Open or
click on the toolbar.
• Open the DBASE file BUS_SURV.DBF in
TCW\EXERCISE. TransCAD displays a survey
taken from transit riders.
• Choose Statistics-Correlations to display the
Correlations dialog box.
Calculating Correlations
• Choose AGE, AUTOS, HHINC1000S and
EDUCATION from the Fields drop-down list
(using the Ctrl key) and click OK.
• Enter MYCORREL as the filename and click OK.
TransCAD calculates the correlations among the
selected variables and puts the results in a matrix.
TransCAD also launches Notepad to display a
report file. Close Notepad after reading the report.
Exercise #1
• Open any table that has two or more numerical
fields and perform both one- and two-way
tabulations on the data fields. Experiment with
changing the methods and the number of classes to
see the effects on the ranges.
Exercise #2
• Using the same table used in Exercise #1, calculate
the correlations of all the fields in the table. Analyze
the results and see which fields are positively or
negatively correlated with each other.
Statistical Modeling
• TransCAD provides various tools for statistical
modeling. You can:
– Estimate a linear regression model
– Evaluate a linear regression model
– Create a linear regression model
– Estimate, evaluate and create binary logit models
Basics: Linear Regression
• Definition: A derived linear relationship between
two or more related variables used to predict values
of one variable when given the values of other
variables
Example: Linear Regression
Variable Y
Y = aX + b
Variable X
Getting Ready to Estimate a Regression Model
• Choose File-Close All, then choose File-Open or
click on the toolbar.
• Open the DBASE file FL_BSURV.DBF in
TCW\EXERCISE. TransCAD displays a survey
taken from transit riders.
• Choose Statistics-Model Estimation.
• Choose HHINC1000S from the Dependent dropdown list.
Estimating a Linear Regression Model
• Choose AGE, AUTOS and EDUCATION from the
Independent drop-down list, and click OK.
• Enter MYEST as the output filename and click OK.
TransCAD creates a model file and reports the
results of the estimation. Close Notepad after
reading the report.
• Make the FL_BSURV dataview the active window.
Creating a Model File
• Choose File-Save As, choose dBASE file from the
List Files of Type drop-down list and enter
MYSURV as the output filename.
• Open the DBASE file MYSURV.DBF.
• Choose Statistics-Create Model File.
• Choose AGE, AUTOS, and EDUCATION as the
model variables and click OK.
Getting Ready to Apply a Model
• Enter 1 for the Coefficient for CONSTANT and 0.5
for the Coefficient for AUTOS.
• All the other settings are correct. Click OK.
• Enter MYMOD as the model filename and click
OK. TransCAD creates the model file.
• Choose Statistics-Model Evaluation.
• Choose MYMOD.MOD for the model file and click
OK.
Applying a Model
• Choose HHINC1000S from the Results In dropdown list and click OK. TransCAD evaluates the
model and estimates the values for HHINC1000S.
• TransCAD also launches Notepad to display a
report file. Close Notepad after reading the report.
In Depth: Statistical Modeling
• The .MOD model files created from TransCAD are
text files and can be edited.
• You can also:
– Create formula fields before estimating or applying
models to create transformations
– Estimate and evaluate models based on selections of
records
– Estimate binary logit models
Model Files
Model of HHINC1000S for BUS_SURV (All Records)
"CONSTANT",33.3981655761
"AGE",-0.06061504867868
"AUTOS",2.14894268478
"EDUCATION",-0.04778903526361
Estimating a Model
• Choose Statistics-Model Estimation to display the
Model Estimation dialog box:
Evaluating a Model
• Choose Statistics-Model Evaluation to display the
Forecast dialog box:
Creating a Model
• Choose Statistics-Create Model File to display the
Model Coefficients dialog box:
Exercise #1
• Open any table that has two or more numerical
fields and estimate a linear regression model using
any fields that interest you. Analyze the results and
look at the R-squared and t-statistics to see if your
model is valid.
Exercise #2
• Open any table with two or more numerical fields
and copy it to another table. Using the copied table,
create a model file. Using your model file, apply
your model to forecast your dependent values.
Basics: Spatial Autocorrelation
• Definition: A statistic that determines whether
adjacent observations in a geographic area sample
have a tendency to have correlated values.
Basics: Adjacency Matrix
• Definition: A matrix that contains one row and one
column for each area feature.
• The Adjacency Matrix indicates whether a pair of
areas have a common border
• The Adjacency Level Matrix indicates the level of
adjacency, from 0 to 1
• The Common Border Length Matrix gives the
length of the common border
Example: Adjacency Matrix
Getting Ready for Spatial Autocorrelation
• Choose File-Close All, then choose File-Open or
click on the toolbar.
• Open the geographic file UTOWN_ZN.DBD in
TCW\TUTORIAL. TransCAD displays the zones
for UTOWN.
• Choose Statistics-Adjacency Matrix to display the
Adjacency Matrix dialog box.
Calculating Spatial Adjacency
• All the settings are correct. Click OK.
• Enter MYADJ as the matrix filename and click OK.
TransCAD creates an adjacency matrix for the area
layer.
• TransCAD also launches Notepad to display a
report file. Close Notepad after reading the report.
Calculating Spatial Autocorrelation #1
• Make the Zone map the active window.
• Choose Statistics-Spatial Autocorrelation to display
the Spatial Autocorrelation dialog box.
• Choose [TOTAL HH] from the Data Field dropdown list.
Calculating Spatial Autocorrelation #2
• Click OK. TransCAD calculates the spatial
autocorrelation of the [TOTAL HH] field of the
area layer
• TransCAD also launches Notepad to display a
report file. Close Notepad after reading the report.
Trip Generation Procedures
• Goal: understand how to use TransCAD to:
– Generate inputs for trip generation
– Run the trip generation procedures
– Understand, interpret and analyze procedure results
Trip Generation
• Used to predict trips generated by households or
zones given data about “trip generators” in the zone
• Trip ends are classified as productions and
attractions or origins and destinations
• Separate models are usually used to estimate each
trip end
• Final results are balanced produced and attracted
trips for each zone in the analysis area for each trip
purpose
Required Inputs for Trip Generation
• Data table containing, for each zone, fields for “trip
generators” (e.g., households, vehicles,
employment)
• Model for each trip purpose used
• Trip rate data in model file or table form (e.g., 2
trips per 1 vehicle household) for each trip purpose
Linear Regression
• Simplified generation models consist of regressions
that estimate generated trips
• Often, produced or attracted trips are predicted
given other explanatory variables, such as
households, # of vehicles, employment, etc.
• Data sets for regression can be aggregated (at the
zone level) or disaggregate (individual) and then
aggregated to the zone
Estimating a Regression Model
• Choose File-Close All, then choose File-Open or
click on the toolbar.
– Open the map file EL_PASO.MAP in TCW\TUTORIAL.
– Choose Statistics-Model Estimation.
– Click the Regression radio button
– Choose [VEH WORK TRIPS] from the scroll list
– Choose the following from the Independent TAB
• RETAIL EMP
• NON RETAIL EMP
– Click OK
– Type “Myattr1” as the file name and Click SAVE
Regression Results
Field Name
[RETAIL EMP]
[NON RETAIL EMP]
[VEH WORK TRIPS]
Mean
Std Dev
49.637
93.8337
324.836
632.875
691.548
1315.48
Dependent field is [VEH WORK TRIPS]
Source
Model
Error
Total
R Squared
Adj R Squared
Field Name
CONSTANT
[RETAIL EMP]
[NON RETAIL EMP]
df
SS
2
559
561
Mean SS F Ratio
9.65E+08 4.83E+08 50239.7
5.37E+06 9608.22
9.71E+08
0.9945
0.9944
Estimate Std. Error
t stat
-9.08349
2.2242 0.0655268 33.9433
1.817 0.00971539 187.023
Estimating Trip Generation in TransCAD
• Save the downloaded data file as *.DBF
• Open the file in TransCAD
• Estimate models for work and non-work trips
Data Description
• zone - Zone ID
• nstud - Students in Hhld
• dwtype - Dwelling Type
• nfem - Females in Hhhld
• npers - Persons in Hhld
• nmale - Males in Hhld
• nveh - Vehicles in Hhld
• nchild - Children in Hhld
• nlic - Licensed Persons in
hhld
• n65+ - Seniors in Hhld
• nftw - Full-time workers
• nnwk - Non-work trips
• nptw - Part-time workers
• expfac - Expansion Factor
• nwah - Workers at home
• nwork - Work Trips
Creating a Model File
• Choose File-Save As, choose dBASE file from the
List Files of Type drop-down list and enter
MYSURV as the output filename.
• Open the dBASE file MYSURV.DBF.
• Choose Statistics-Create Model File.
• Choose AGE, AUTOS, and EDUCATION as the
model variables and click OK.
Getting Ready to Apply a Model
• Enter 1 for the Coefficient for CONSTANT and 0.5
for the Coefficient for AUTOS.
• All the other settings are correct. Click OK.
• Enter MYMOD as the model filename and click
OK. TransCAD creates the model file.
• Choose Statistics-Model Evaluation.
• Choose MYMOD.MOD for the model file and click
OK.
Applying a Model
• Choose HHINC1000S from the Results In dropdown list and click OK. TransCAD evaluates the
model and estimates the values for HHINC1000S.
• TransCAD also launches Notepad to display a
report file. Close Notepad after reading the report.
In Depth: Statistical Modeling
• The .MOD model files created from TransCAD are
text files and can be edited.
• You can also:
– Create formula fields before estimating or applying
models for transformations
– Estimate and evaluate models based on selections of
records
– Estimate binary logit models
Model Files
Model of HHINC1000S for BUS_SURV (All Records)
"CONSTANT",33.3981655761
"AGE",-0.06061504867868
"AUTOS",2.14894268478
"EDUCATION",-0.04778903526361
Cross Classification
• Cross Classification methods separate the
population into homogeneous groups based on
certain socio-economic characteristics
• Average trip rates are estimated for each classified
group, the rate depending on a zone statistic (e.g.,
trips/household)
• Once a zone or subset of a zone is classified into a
group, the zone statistic is multiplied by the
appropriate trip rate to estimate the total trips
generated
Inputs for Cross Classification
• Trip rate table
– Defines, for each trip purpose, the classifications used
and the trip rates for each classification
• Zone data table
– Contains information on the average values of the
classification fields within each zone
Example: Trip Rate Table
Example: Zone Data Table
Getting Ready to Run Cross Classification
• Choose File-Close All, then choose File-Open or
click on the toolbar.
• Open the workspace VERMONT.WRK in
TCW\TUTORIAL.
• Choose Planning>Trip Productions>Cross
Classification.
• Choose MCD from the Zone Data drop-down list.
• Choose Households from the Zone or Subzone
drop-down list.
Setting Up Cross Classification
• Choose VMT_CRCL from the Trip Rate Table
drop-down list.
• Choose all three trip purposes.
• Choose [Avg Car/HH] from the Rate Table Fields
scroll list.
• Choose [AUTO/HH] from the Zone Data Field
drop-down list.
Running Cross Classification
• Choose [Avg Inc/HH] from the Rate Table Fields
scroll list.
• Choose [INC/HH] from the Zone Data Field dropdown list.
• The settings are all correct. Click OK.
• Enter MYPROD1 as the filename and click OK.
TransCAD computes the productions for all zones
and purposes and displays a dataview of the results.
Sub-Groups Within Zones
• In some cross classification models, zone data are
divided into several homogeneous groups and
different trip rates are applied to each homogenous
group
• The estimated trips for each sub-group are then
summed to predict total trips generated for the zone
• TransCAD’s cross classification procedure can
accomodate these types of models
Cross Classification With Sub-Groups
Zonal Data With Sub-Groups
Trip Rate Table
Cross-Classification
Building Cross Classification Tables
• TransCAD provides a procedure to create a trip rate
table given disaggregate data (go to
Planning>Planning utilities>Build crossclassification table)
• The user supplies the data, the classification fields
and the classification ranges and the procedure
calculates average trip rates and variances for the
ranges
• In defining classification fields and ranges, it is
good practice to have homogeneity within ranges
and heterogeneity between ranges
Example: Creating Trip Rate Tables
Quick Response Models
• TransCAD provides procedures to estimate
productions and attractions using the default trip rate
table from NCHRP 187 and the Quick Response
Method
• QRM procedures estimate trips given number of
households per zone and, optionally data on income,
autos, employment, etc.
• This trip rate table is based on data collected from
across the United States
Estimating Trips Productions Using QRM
• Choose File-Close All, then choose File-Open or
click on the toolbar.
• Open the map UTOWN.MAP from
TCW\TUTORIAL.
• Choose Planning-Trip Production-Quick Response.
• Enter 100 as the Urban Area Population.
• Choose Autos/HH from the Classify By drop-down
list.
Estimating Trips
• Choose [Autos/HH] from the Auto/HH drop-down
list.
• All other settings are correct. Click OK.
• Enter MYPROD3 as the output file and click OK.
TransCAD calculates the trip productions and
displays them in a dataview.
Balancing
• Usually, separate models are used to estimate
productions and attractions, which often leads to a
discrepancy between total trips produced and total
trips attracted.
• TransCAD provides several balancing methods to
create production and attraction estimates which
sum up to the same number of trips for each
purpose
Balancing Methods
• Hold productions constant
• Hold attractions constant
• Weighted sum of productions and attractions
• Sum to user specified value
Quick Start: Getting Ready to Balance
• Choose File-Close All, then choose File-Open or
click on the toolbar.
• Open the map file VMT_BAL.MAP in
TCW\TUTORIAL.
• Choose Planning-Balance.
• Choose [HBW-P] from the drop-down list directly
under Vector 1.
• Click the Add button.
Balancing Productions and Attractions
• Choose [HBNW-P] from the drop-down list directly
under Vector 1.
• Choose Sum to Value from the Method drop-down
list.
• Enter 1000000 as the value to sum to and click OK.
• Enter MYBAL as the output file name and click
OK. TransCAD balances the two sets of vectors.
In Depth: Balancing Options
Productions, Attractions and Balancing w/ QRM