0

I am working on predicting the number of customer attending an hospital to perform MR scan per day. I have the daily count of the customers attending the hospital for the last 4 years. But I am not able to capture the daily change in the count of customers attending the hospital for different months accurately.

I am working on R Studio and I have tried ARIMA as suggested by Rob Hyndman.

modelfitsample<- read.csv("data_xreg_train.csv")
modeltest <- read.csv("data_xreg_test.csv")

ts_beverly_train <- ts(modelfitsample$Volume, start = c(2015,1), frequency=365.25)
ts_beverly_test <- ts(modeltest$Volume, start = c(2018,1), frequency=365)

xreg <- cbind(month=model.matrix(~as.factor(modelfitsample$Month)))
xreg1 <- cbind(month=model.matrix(~as.factor(modeltest$Month)))

modArima <- auto.arima(ts_beverly_train, xreg=xreg)
modArima

fit11 <- forecast(modArima, h=485, xreg = xreg1)

plot(fit11)

I need a prediction that can capture the daily change and also consider the monthly seasonality.

Richard Hardy
  • 54,375
  • 10
  • 95
  • 219
Prasad Dalvi
  • 135
  • 11
  • 2
    How is the title related to the body of the question? – Richard Hardy May 24 '19 at 07:45
  • 1
    You might want to scan https://stats.stackexchange.com/search?tab=newest&q=user%3a3382%20daily as there have been many useful posts on how to model daily data. – IrishStat May 24 '19 at 09:08
  • 1
    In particular my response to https://stats.stackexchange.com/questions/143358/r-time-series-forecasting-questions-regarding-my-output/143421#143421 might provide guidance here. – IrishStat May 24 '19 at 10:21

0 Answers0