Hi ARIMA experts,
We have data like below:
df = data.frame(
Jan10 = c(0, 18, 9, 4, 20, 18, 3, 34),
Feb10 = c(0, 19, 6, 0, 4, 14, 10, 10),
Mar10 = c(2, 7, 12, 11, 14, 0, 12, 10),
.......
.......
.......
Oct15 = c(7, 16, 98, 42, 2, 18, 13, 3),
Nov15 = c(9, 9, 61, 0, 41, 14, 17, 11),
Dec15 = c(2, 72, 1, 11, 14, 2, 2, 19),
city = as.factor(c("SD", "BLR", "HAJ", "MEX", "SD", "BLR", "HAJ",
"MEX")),
type = as.factor(c("MER", "BMW", "MER", "BMW", "MER", "BMW", "MER",
"BMW")),
size = as.factor(c("13", "14", "15", "16", "17", "18", "19", "20"))
)
How can we apply ARIMA for each row ? Not Column
For example: each unique combination i.e.each row, Got to apply ARIMA
Idea is to Forecast these values for next 6 months for each combination or rows.
i.e.
# Specific row or combination:
city == "SD"
type == "MER"
size == "13"
Jan 2010: 0,
Feb 2010: 0,
Mar 2010: 2,
.........
Oct 2015: 7,
Nov 2015: 9,
Dec 2015: 2
# What is the value for Jan-Jun 2016 ?
Idea is to use For loop or map functions !
Feeding the Months data as input to ARIMA and xreg parameters as
the city, type and size
Could you please enlighten me
Abi