forked from byu-transpolab/uvx_headways
-
Notifications
You must be signed in to change notification settings - Fork 0
/
02-methods.Rmd
53 lines (44 loc) · 2.24 KB
/
02-methods.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Methods
```{r setup, include=FALSE}
library(targets)
library(tidyverse)
library(quantreg)
library(modelsummary)
if(knitr::is_latex_output()){
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
}
theme_set(theme_bw())
```
UTA provided timepoint data for all trips on the UVX system for the entirety of
2019. We calculated the headway between successive UVX trips at each stop, as
well as the cumulative dwell time of all stations along the route. Because the
UVX route loops around south Provo and stops at the Provo FrontRunner station
twice, this created some minor difficulties in data processing, and we removed
the timepoints on this portion of the route. We also limit our analysis to the
period between 7 AM and 8 PM.
```{r times, eval = FALSE}
tar_load(period_change_table)
period_change_table
```
From January through June 6, the system operated with a 5-minute TSP threshold,.
with TSP granted only if the vehicle was five or more minutes behind its
scheduled timepoint. After August 12, the system switched to a 2-minute TSP
threshold. During the summer, the TSP system was configured as follows for this
experiment:
- May 2 through June 6, 2019: 5 minute threshold
- June 10 through July 12 and after August 12: 2 minute threshold
- July 15 through July 26: no TSP
- July 30 through August 9: TSP always activated
We discarded trips from January through April and September through December
because the additional university passenger demand could interfere in the
experiment and there were no tests of the "None" or "Always" TSP thresholds
during the school year.
Standard statistical tests --- such as the student's $t$-test or
ordinary least squares regression models --- are designed to ascertain the
significance of a statistic at the *mean* of the distribution. In this
application, we are less concerned with the mean deviation in headway, and are
instead interested in whether TSP is able to reduce the lateness of buses that
already have substantial deviation from their programmed headway. Consequently,
we employ conditional quantile regression [@koenker2001quantile] to estimate the
effect of TSP on headway deviation at the 85th percentile of the distribution.
This is done with the `quantreg` package for R [@quantreg; @R]