Statement of problem: An ambulance is at the hospital dropping off a patient. The goal of the paramedic is to get released from the hospital as soon as possible. I am curious, what are the factors in how long an ambulance off loads a patient at the hospital? Can I predict how long an offload will take given certain variables. And how confident can I be in this model? The Dependent Variable is HospitalTime, it is a ratio type of data and is measured in seconds. The Independent Variables are:

  • Hospital, a nominal type of data recoded into integers, 1 would stand for Lee Memorial.
  • Ambulance, a nominal type of data recoded into integers, 9 would stand for ambulance #9
  • PatientPriority is an ordinal type of data recoded into integers. A 1 is a high priority, 2 is a medium priority and 3 is low acuity.
  • MonthOfCall is an interval type of data recoded into integers. A 6 would be June and 12 is December. A 12 (December) is not twice as much as a 6 (June) in this case.
  • HourOfCall is an interval type of data recoded into integers. Once again, an offload happening at 10:00 pm is not more than something happening at 10:00 am.
  • Officer1 and Officer2 are nominal data and are integers representing an EMT and a paramedic.

My question is this: Given this type of data and my goal to predict the off loading time at the hospital, what kind of regression model should I look into?

I have looked at my statistics books from university days and they are all using ratio data. My data is mixed with nominal, ordinal, interval and ratio.

I have as much data as you could ask for. I have at least 100,000 observations.

Can you please push me in the right direction? What kind of model should I use with this type of data?

Shown below are observations to give you a tiny peek at my data:

757620,1849,7,11,2,10,10,234,771,chr(10) 802611,2625,7,11,3,1,18,234,777,chr(10) 
765597,1149,7,12,3,11,2,234,777,chr(10) 770926,1785,7,12,3,11,15,234,777,chr(10) 
771689,3557,7,12,2,11,14,234,777,chr(10) 822758,1073,7,20,3,3,13,777,307,chr(10) 
767249,2570,7,22,2,11,11,560,778,chr(10) 767326,1998,7,22,1,11,18,560,777,chr(10) 
785903,1660,7,22,3,12,12,234,777,chr(10) 787644,2852,7,22,3,12,17,234,777,chr(10) 
760294,1327,7,23,2,10,14,498,735,chr(10) 994677,3653,7,32,2,2,15,181,159,chr(10) 
994677,3653,7,32,2,2,15,181,159,chr(10) 788471,2053,5,9,2,1,3,498,777,chr(10) 
788471,2053,5,9,2,1,3,498,777,chr(10) 759983,1342,5,11,2,10,8,474,777,chr(10)
791243,1635,5,11,2,1,18,234,777,chr(10) 800796,1381,5,11,3,1,11,234,777,chr(10)

P.S. This question is cross-posted in Stack-Overflow under the same title and author.

  • 1
    $\begingroup$ This question appears to be off-topic because it is about statistics and should be on crossvalidated, not stack overflow! $\endgroup$ – Spacedman Dec 17 '14 at 10:23
  • $\begingroup$ We could maybe have a Meta thread about this, but I find questions like this on-topic for Data Science, as well as Cross Validated. It shouldn't be cross-posted but either could be suitable IMHO. The more it's about an actual data set and actual tools, the more it's on-topic for DS vs CV. $\endgroup$ – Sean Owen Jan 6 '17 at 17:55

I think I'd try to model the rate at which the ambulances are released instead of the time it takes. That would let me use Poisson regression, which is the canonical type of GLM for rates (in R's GLM, set family = "poisson".) However, in order to use PR, the data needs to have its variance equal to its mean, or at least close to it.

| improve this answer | |

This seems to be a standard regression problem in which there are two goals:

  1. Obtain a predictive model that can be used for prediction.
  2. Which variables seem to be the most important ones to be used.

For both the above problems use an ensemble model. Consider both a random forest and a gradient boosted machine. Both these models will use the independent variables and predict the Hospital time. Additionally, through variable importances, you can obtain which variables are the most important ones and have the most impact in predicting the output.

| improve this answer | |

Your Answer

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

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