With the asspumption of whatever has occured in the past will continue to happen in the future, we can treat these questions as time series analysis. Below are list of four methods to do forcecasting for a short time series.
- Moving averages
install.packages("zoo") library(zoo) ma = rollmean(ts, k)
- For data without any systematic trend or seasonal components, we can use exponential smoothing
- Accounting for data seasonality using Winter's smoothing
- Accounting for data trend using Holt's smoothing
install.packages("forecast") library(forecast) x = c(1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5 ) x = ts(x, frequency = 5) plot(hw(x, 5), byt = "1")