I recently fit an ARIMA model for some daily sales data. To account for seasonality I used various dummies in xreg
for different days in the month, days in the week, holidays, etc. Since the sales would be related with the number of employees that day, one of the variables that went into model (in xreg
) is number of employees that day.
Recall in simple linear regression, given an equation $y =$ $b_0 + b_1x $, we can calculate estimate of $y$ given $x$, and also estimate a value for $x$ that would give a prespecified $y$.
My question then would be, can we do this in time series in R? Basically what I want to do is the following:
Given the number of employees tomorrow, what would be the forecast for the sales? (usual scenario easily done in the
forecast
package)Given I want tomorrow's sales to be $y$, what would be an estimate of the number of employees necessary?
To tackle this, I read the description of the package forecast
and know that when xreg
in not NULL, it is fitting an regression model with ARMA error. Does that mean I can use the regression coefficients, ARMA coefficients, and the ideal sales to get 2 above just like in a simple linear regression?