# Flexible Forecasting ED Visits

### Introduction

A 10-year forecast on emergency department visits was conducted to support expansion planning. The forecasts were used to assist with scoping the architectural design and staffing models.

### Data

Monthly ED visits at the hospital from 1997 to 2015 was sourced for this analysis. Another data source exists on ED visits from the Hawaii Health Information Corporation; however, the ED statistics from that set does not include multiple visits, left without being seen and observational stays.

#### Dependent Variable

In the ED setting, a visit is defined as a patient visit for a condition where a delay of several hours would not increase the likelihood of an adverse outcome. ED visits during this time frame varied substantially from year-to-year. Fitting a global, linear trend to the entire data would most likely not provide a good fit.

### Model 1

The data was fit using a generalized additive mixed model (GAMM), which is a representation of the generalized additive model as a mixed effects model via the equivalence between random effects and smoothed splines. Unlike ordinary least squares regression, GAMMs can be used to model correlated responses such as the dependence structure of longitudinal data.

The smoothed splines performed well to fit both the year and month terms. The autocorrelation plots, however, reaffirmed the autocorrelated residual structure of the data.

### Model 2

An AR(1) term was added to the model to remove the remaining residual due to autocorrelation as evident from the PACF plot. The likelihood ratio test confirmed that the updated model better fit the longitudinal data. The final model explained 93% of the variance.

## Other Projects

### Complex Survey Analysis in R

Powered by Hydejack v6.6.0