I have a train daily data and test daily data. I fit an ARIMA to my train data, forecast it 7 days and I want to get some performance measures of the forecasted values.
I can get performance measures of the trained fit by runnning
And I can plot the forecast against the test data with this code easily:
main = 'ARIMA',
xlab = 'Date',
ylab = 'Number of patients',
xlim = c(2017.75,2017.9))
lines(test_data, col = 'red', lty = 2)
But I can't find a way to evaluate the prediction. Tried using
accuracy(forecast, test_data) but it returns an error: (this actually happens for all models I try running, what is the problem?)
Error in mean(actual != predicted) : (list) object cannot be coerced to type 'integer' In addition: Warning message: In actual != predicted : longer object length is not a multiple of shorter object length
Can you please help me?