The problem is that when i run ts(), the dates (Mean_Individual_data$Date) which are in posixct format gets converted to integers as shown in the graph via the link below. Are there any ways to preserve date-time format for the x-axis after passing it through ts()?
I have been trying out many methods but can't seem to find a solution to this. So any help or alternative solutions are greatly appreciated.
Data: https://www.dropbox.com/s/9lf2nc74y67uscd/Mean_Individual_data.csv?dl=0
Mean_Individual_data
Date_Timeframe x
1 2098-02-09 09:00:00 20.000000
2 2098-02-10 09:00:00 24.100000
3 2098-02-11 09:00:00 27.900000
4 2098-02-12 09:00:00 28.400000
5 2098-02-12 15:00:00 24.450000
6 2098-02-12 21:00:00 15.800000
7 2098-02-13 09:00:00 16.450000
8 2098-02-13 21:00:00 15.050000
9 2098-02-14 03:00:00 22.700000
10 2098-02-14 09:00:00 14.200000
MA_Individual = ts(Mean_Individual_data$Mean.Result.Value, frequency=60)
fit<-auto.arima(MA_Individual, seasonal=TRUE)
fcast <- forecast(fit, h=20)
plot(fcast, type="o", pch=16, cex=0.65, xlab="Date", ylab="Blood Glucose (mmol/L)", main = "Quart-Hourly BG")
abline(h=4, col="red", lty=2)
The resulting plot: