This function allows for the calculation of travel time estimation confidence intervals on the test data set.

traveltimeCLT(
  data,
  model = c("trip-specific", "population"),
  estimate = c("both", "mean-only"),
  lag = 1L,
  nsamples = 500L,
  min.links = 5L,
  timebin_rules = NULL
)

Arguments

data

A data frame of trips and their road level travel information, formated as trips, see trips or View(data(trips)).

model

Specifies whether the trip-specific or population models should be used.

estimate

Specifies whether to estimate both the mean and variance or mean-only. Only applied with model=trip-specific.

lag

Maximum lag at which to calculate the autocorrelations. Default is 1 for the first order-autocorrelations.

nsamples

The number of trips to sample for parameter estimation.

min.links

The minimum number of links in each of the sampled trip.

timebin_rules

A list containing, start, end, days and tag for each timebin of the dataset (see example in time_bins).

Value

Returns a list of the network parameters (namely the mean and standard deviation of travel time, estimated based on the train data set (see link_mean_variance)) required for estimating travel times for the test data set.

Examples

if (FALSE) {

fit <- traveltimeCLT(train, lag = 1)
}