Predicting Covid 19 by using ARIMA and Holt's Linear trend With plot (predicting 10 days)

that's name of series Covid_data_in_United_States_of_Amireca_till_27_september and

You can download the data from here
http://www.mediafire.com/file/zgqsqtj14g0x0b4/Covid+data+in+United+States+of+Amireca++till+27+september.xlsx/file

have three column dateRep and cases and deaths
Covid_data_in_United_States_of_Amireca_till_27_september
Covid_data_in_United_States_of_Amireca_till_27_september_cases<-Covid_data_in_United_States_of_Amireca_till_27_september$cases
install.packages("forecast")
library(forecast)
Covid_data_in_United_States_of_Amireca_till_27_september_cases
Covid_data_in_United_States_of_Amireca_till_27_september_cases_autoarim<-auto.arima(Covid_data_in_United_States_of_Amireca_till_27_september_cases)
Covid_data_in_United_States_of_Amireca_till_27_september_cases_autoarim
forecast(Covid_data_in_United_States_of_Amireca_till_27_september_cases_autoarim,h=10)
accuracy(forecast(Covid_data_in_United_States_of_Amireca_till_27_september_cases_autoarim,h=10))
par(mfrow=c(2,1))
plot(Covid_data_in_United_States_of_Amireca_till_27_september$dateRep,Covid_data_in_United_States_of_Amireca_till_27_september$cases,lwd=2,xlab = " ACtual Cases By Covid 19 in USA ", ylab = "Number of Covid Cases", col="black",type = "line")
plot(forecast(Covid_data_in_United_States_of_Amireca_till_27_september_cases_autoarim,h=10),lwd=2,xlab = "Cases by Covid 19 in USA Forecasting 10 days",ylab = "Forecasts Number of Covid Cases",col="blue",type = "line")
box(lty = 5,lwd=2)
grid(0,col = "blue")
#Forecast method: Holt's method
library(fpp2)
Covid_data_in_United_States_of_Amireca_till_27_september$cases
fc2<-holt(y =Covid_data_in_United_States_of_Amireca_till_27_september$cases, h =10, lambda = "auto")
summary(fc2)
accuracy(fc2)
par(mfrow=c(2,1))
plot(Covid_data_in_United_States_of_Amireca_till_27_september$dateRep,Covid_data_in_United_States_of_Amireca_till_27_september$cases,lwd=2, xlab = " Cases By Covid 19 in USA", ylab = "Number of Covid Cases", col="black",type = "line")
plot(holt(y =Covid_data_in_United_States_of_Amireca_till_27_september$cases, h =10, lambda = "auto"),lwd=2, xlab = "Forecasts Number of Covid cases for 10 days In USA", ylab = "Number of Covid cases in USA ", col="blue",type = "line")
box(lty = 5,lwd=2)
grid(0,col = "blue")

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.