PredictTransitTFL: Main module function

Description Usage Arguments Details Value

View source: R/PredictTransitTFL.R

Description

PredictTransitTFL predicts Transit Trip Frequency and Length (TFL) for each household in the households dataset using independent variables including household characteristics and 5D built environment variables.

Usage

1

Arguments

L

A list containing the components listed in the Get specifications for the module.

Details

This function predicts TransitTFL for each hosuehold in the model region where each household is assigned an TransitTFL. The model objects as a part of the inputs are stored in data frame with two columns: a column for segmentation (e.g., metro, non-metro) and a 'model' column for model object (list-column data structure). The function "nests" the households data frame into a list-column data frame by segments and applies the generic predict() function for each segment to predict TransitTFL for each household. The vectors of HhId and TransitTFL produced by the PredictTransitTFL function are to be stored in the "Household" table.

If this table does not exist, the function calculates a LENGTH value for the table and returns that as well. The framework uses this information to initialize the Households table. The function also computes the maximum numbers of characters in the HhId and Azone datasets and assigns these to a SIZE vector. This is necessary so that the framework can initialize these datasets in the datastore. All the results are returned in a list.

Value

A list containing the components specified in the Set specifications for the module along with: LENGTH: A named integer vector having a single named element, "Household", which identifies the length (number of rows) of the Household table to be created in the datastore. SIZE: A named integer vector having two elements. The first element, "Azone", identifies the size of the longest Azone name. The second element, "HhId", identifies the size of the longest HhId.


cities-lab/VETravelDemandMM documentation built on Aug. 1, 2019, 4:43 p.m.