0
$\begingroup$

I have a general question with regards to modelling the chance that domestic flights within the U.S. are cancelled or not using logistic regression (which I'm relatively new to).

I have used 'R' to fit a logistic regression model to a vast data set comprising of millions of flights over the past five years (2014 - 2018) using the following factors:

  • Year
  • Month
  • Day of the week
  • Origin airport
  • Destination airport

Now, the output of the GLM analysis shows that all of these factors are significant. In particular, the Year variable is likely key as it may give insight into the 'severity of weather' in that year, or 'mix of flights' in that year.

However, my issue now is that I want to use these results to predict the chance that a given flight (if I know the date of departure, and origin / destination) will be cancelled. I want to do this for flights occurring in 2019.

Of course, the 'Year' factor is now no use to me, as it is only used to predict cancellations for historic years. And i'm not sure how to interpret the factors given that I am saying that a significant factor is now of no use.

Perhaps one option is to assume that 2019 will 'behave like 2018' and hence, when using the GLM for forecasting, I ignore the year variable, but assume that the '2018' factor is the correct factor to use? And 'leave' all other factor values as they are?

Or, perhaps a better option is to completely ignore the Year factor from my GLM, and run it again without the Year variable? (But then, i'm not sure if the new factors for the other variables will adjust in a way that makes sense for forecasting 2019)?

Sorry if that's a little broad and vague, but any insight into this problem and general thought processes on how best to model this would be greatly appreciated.

Thanks

$\endgroup$
  • $\begingroup$ Year is probably a numeric variable, which means the log odds of a cancelation increase each year by the coefficient of year. If you don't want to posit that year has linear effect on the log odds, then don't include it in the model. $\endgroup$ – Demetri Pananos Apr 25 at 21:59
  • $\begingroup$ Sorry, no, I have four variables to signify year. One variable for each of 2015, 2016, 2017, 2018, where the variable equals 1 if the year to model is that year, else it is 0. Therefore I have four coefficients representing year, and then an intercept term (reflecting the 2011 year). My question is whether the factors other than year that I have derived are "more accurate" if I leave year in or take it out. $\endgroup$ – Delvesy Apr 25 at 23:06
  • $\begingroup$ I mean (reflecting the 2014 year), above. $\endgroup$ – Delvesy Apr 26 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.