# Forecast ARIMA and out of sample evaluation

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 summary(fit) And I can plot the forecast against the test data with this code easily: plot(forecast, 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'

The problem was very stupid. I had installed both libraries Metrics and forecast and both have an accuracy() function.
The one I was looking for is the forecast one, but the Metrics one is the one I was actually using, hence the error.