I am working on a project for a Masters Project. The town I am looking at Switched to a Fareless system in Feb 1, 2011. I want to look and see if this increased ridership by a substantial amount. I have the following


for data and have it drilled down further to even amount of riders per day per hour since 2008. But I don't think that detail of information is needed I am thinking looking by weeks.

The thing is the town and student base of the town is growing at super fast rates. In 2011 there were 400 new students added to campus but there were 1,200 continuing students, so a net gain of 1,600 students. The town is only 54,000 people with the college only being about 26,000 (as of Fall 2012).

The way I was going to see if the new Fareless system was working as planned or not was to use time-series forecasting and use just the "pre-fareless" data and forecast out what the numbers would be expected to be. Compare those to the "post-fareless" data and see if it falls into the confidence intervals of the "pre-fareless" data. If it is outside of it then the change in fare was a success? The student growth has been pretty constant since 2008 if not stronger in 2009/2010 then lowering 2011 and 2012.

I have R/SPSS/STATA/Excel access. I am pretty competent with SPSS and very new at R and STATA. All help/advice would be great. Thank you in advance.


So far it seems that ARIMA is the method to use to analyze this data. Would still love to hear other peoples thoughts and ideas on maybe other items that I might be missing other than population growth.


1 Answer 1


Several thoughts:

A. Your data is seasonal. That is, it will tend to cycle on a regular basis, in your case an annual basis. For example, October seems to be a high-attendance month each year, while June seems to be a low-attendance month.

There are various kinds of techniques for handling this, including models called ARIMA models. Unfortunately, most of these techniques require a fair amount of analysis to decide the appropriate parameters.

Your data may also be seasonal on a weekly basis: weekends being dramatically different from weekdays, etc.

B. At what level will you work: day, week, month?

I'd recommend looking at the data on a daily basis to see if you should treat weekends differently from weekdays. You might find that ridership doesn't change much, or you might decide you're going to lump it all together anyhow, but you should at least look at the weekday-weekend issue if you have daily data.

I'd recommend that you actually work with monthly data, though. In particular, I'd calculate for each month the average daily ridership: divide the month's number by the length of the month in days. That's because different months will be different lengths, and dividing like this eliminates that issue. I personally avoid weekly data because some years have 52 weeks and some 53, but they all have the same number of months. (Plus, months have more meaning to people than weeks of the year.)

C. Your extra ("exogenous") data of the number of students on campus is critical, and has to enter your model somehow. If you're working on monthly ridership, you'll need to have monthly student data. (Perhaps you estimate monthly data from semester enrollments, but take into account holidays and other patterns of the school year. Be rigorous about it and think this through.)

The change from a fare system to fareless would be accounted for with an indicator variable that's 0 before Feb 2011, and 1 from then on. You'd also probably have a month number variable that's 1 for July 08, 2 for August 08, etc.

D. If you're not a math/stats student, you probably want to have a consultant on this to help you out, so SPSS/STATA/R depends on who you can get to help you or give you tips. I'd say all three are capable of doing what you need done. (If you're a computer geek, don't mind the command line, and have the time to learn about ARIMA, the US Census Bureau's X13-ARIMA-SEATS software is public domain and very powerful. I'd investigate other options first, but just wanted to mention it: if you work through all of its outputs and diagnostics and learn what they mean, it's a time series education in itself.)


E. The model you create will encompass the entire time frame of your data, and would include a time variable (implicit with some tools), the ridership data, the student population data, and the fare system indicator variable. You then look at the model fit with and without the fare system indicator, and look at the indicator's coefficient's statistical significance.

  • $\begingroup$ When it comes to ARIMA the best I know is the Forecast package in R. Mostly the auto ARIMA command ha. The level I will work with is the level I choose to code the data. I have it down to Day/Hour but it is currently in paper form and needs to be coded into a dataset. Thus trying to figure my level of measurement before I code to prevent wasted time. $\endgroup$
    – DanTheMan
    Commented Jan 2, 2013 at 22:45
  • $\begingroup$ It looks like if you use auto.arima, you'd use its 'xreg' parameter to include the student count and fare system indicator. $\endgroup$
    – Wayne
    Commented Jan 2, 2013 at 22:55
  • 1
    $\begingroup$ Calculating the daily average for each month doesn't shift or spread any data from one month to another, so it wouldn't change seasonality. It just deals with the fact that when you break the year into 12 parts, you're not breaking it into equal-sized parts. It's more of a weighting scheme. As for weekday/weekend, I'm just thinking that you might look at a few random weeks before you enter the data. If it turns out that weekday ridership was flat (accounting for student population increase), but weekend ridership tripled, that's pretty significant. $\endgroup$
    – Wayne
    Commented Jan 3, 2013 at 14:08
  • 1
    $\begingroup$ Actually, you'll have a single model that includes the ridership, the student population, and an indicator for the fare change (easy to do in X13 with LS2011.FEB) and you see if the model with the indicator fits better than one without. This isn't specific to X13, you'd do the same thing in R. I've edited my answer. $\endgroup$
    – Wayne
    Commented Jan 4, 2013 at 20:18
  • 1
    $\begingroup$ I had originally said look for significance of the indicator variable, and then thought that perhaps the model could fit better and yet the the indicator be non-significant. Perhaps that's not possible -- I'm still learning -- but I'm thinking that in this situation a huge change occurred to the system, so even if you were going to improve the model you wouldn't remove the fare indicator even if it was not statistically significant. So the important thing is the model fit (given that you're not overfitting). $\endgroup$
    – Wayne
    Commented Jan 4, 2013 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.