https://www.econometrics-with-r.org/3.3-hypothesis-tests-concerning-the-population-mean.html#one-sided-alternatives for hypothesis testing install.packages("tseries") install.packages("forecast") install.pakages("fpp") install.pakages("ggplot2") library(forecast) library(tseries) library("ggplot2") x <- rnorm(1000) # no unit-root adf.test(x) # Output to be created as png file png(file = "TimeSeriesGFG.png") # Plotting graph without forecasting plot(BJsales, main = "Graph without forecasting", col.main = "darkgreen") # Saving the file dev.off() # Output to be created as png file png(file = "TimeSeriesARIMAGFG.png") # Fitting model using arima model # > fit <- auto.arima(BJsales) > fit # Next 10 forecasted values forecastedValues <- forecast(fit, 10) # forecasted values print(forecastedValues) plot(forecastedValues, main = "Graph with forecasting", col.main = "darkgreen") # saving the file dev.off()