# Using a Response Variable as a Predictor Variable in a Future Model?

This is a statistical problem I am working on and I would like to request some guidance from the respected community.

• Suppose there is a factory that receives food orders.
• The food sits in a warehouse and is then shipped
• Employees process the orders on a first in, first out basis

Each week, I know (i.e. historical data) :

• The total number of employees that showed up to work that week
• How many food orders were processed at the end of that week
• How many new food orders were received by the end of that week
• How many food orders are currently backlog at the end of that week
• Historically speaking, I assume that new intake is independent of new food orders and existing backlog
• Historically speaking, I assume that fluctuations (e.g. factory accidents, vacation, retirement) in the total number of employees each week is independent of new food orders and existing backlogs

I know that it costs $$x$$ dollars to hire a new employee for 6 months. Suppose I hire one new employee - I want to estimate what would the cost-benefit impact of hiring this new employee on production and backlog.

I thought of two ways to work on this problem. I have studied basic regression models, but in this question it seems that the predictor variable itself was the response variable in a previous model. Statistically speaking, I am not sure if this is permissible.

Approach 1: Analyzing Net Benefit Directly

1. Define variables: \begin{align*} t &: \text{time (in weeks)} \\ E_t &: \text{number of employees at time t} \\ \hat{P}_t &: \text{estimated number of orders processed at time t} \\ \hat{R}_t &: \text{estimated number of orders received at time t} \\ \hat{B}_t &: \text{estimated backlog at time t} \\ x &: \text{cost to hire a new person} \end{align*}

2. Model the relationship between employees and processed orders: $$\hat{P}_t = \hat{\alpha} E_t + \hat{\epsilon}_t$$ Where $$\hat{\alpha}$$ is the estimated average number of orders processed per employee per week, and $$\hat{\epsilon}_t$$ is the estimated error term.

3. Model the backlog: $$\hat{B}_t = \hat{B}_{t-1} + \hat{R}_t - \hat{P}_t$$

4. Forecast orders received: We can use time series forecasting methods like ARIMA to predict future orders: $$\hat{R}_t = \hat{f}(\hat{R}_{t-1}, \hat{R}_{t-2}, ...) + \hat{\eta}_t$$ Where $$\hat{f}$$ is the estimated forecasting function and $$\hat{\eta}_t$$ is the estimated forecast error.

5. Estimate the impact of hiring a new person: $$\Delta \hat{P}_t = \hat{\alpha}$$ $$\Delta \hat{B}_t = -\hat{\alpha}$$

6. Cost-benefit analysis: $$\text{Cost} = x$$ $$\hat{\text{Benefit}} = \sum_{t=1}^{26} (\Delta \hat{P}_t \cdot \hat{v} - \Delta \hat{B}_t \cdot \hat{c})$$ Where $$\hat{v}$$ is the estimated value of processing an additional order and $$\hat{c}$$ is the estimated cost of holding an order in backlog.

7. Net benefit over 6 months (26 weeks): $$\hat{\text{Net Benefit}} = \hat{\text{Benefit}} - \text{Cost}$$

From here, you can play around and try increasing more employees, and see what the estimated impact is. You can also try to create adverse scenarios where you artificially elevate the number of new food orders to put strain on the system (sensitivity testing)

Approach 2: Analyzing Net Benefit from Regression Coefficients

Model for New Orders: $$\text{new orders}_t = c + \sum{i=1}^p \phi_i \cdot \text{new orders}_{t-i} + \sum{j=1}^q \theta_j \epsilon_{t-j} + \epsilon_t$$ Where:

• $$c$$ is a constant term
• $$\phi_i$$ are the autoregressive parameters
• $$\theta_j$$ are the moving average parameters
• $$\epsilon_t$$ is the error term

Model for Backlog:

$$\text{backlog}_t = f(\text{employees}_{t-1}, \text{backlog}_{t-1}, \text{new orders}_{t-1})$$ $$\text{backlog}_t = \beta_0 + \beta_1 \cdot \text{employees}_{t-1} + \beta_2 \cdot \text{backlog}_{t-1} + \beta_3 \cdot \text{neworders}_{t-1} + \epsilon_t$$

Oras an ARIMAX model: $$\text{backlog}_t = \beta_0 + \sum{i=1}^p \phi_i \cdot \text{backlog}_{t-i} + \beta_1 \cdot \text{employees}_{t-1} + \beta_2 \cdot \text{neworders}_{t-1} + \sum{j=1}^q \theta_j \epsilon_{t-j} + \epsilon_t$$ Where:

• $$\beta_0$$ is the intercept
• $$\phi_i$$ are autoregressive parameters for backlog
• $$\beta_1, \beta_2$$ are coefficients for exogenous variables
• $$\theta_j$$ are moving average parameters
• $$\epsilon_t$$ is the error term

First fit both models using historical data to estimate all parameters. For forecasting, project future employee numbers (controllable variable) and use the new orders model to forecast future orders.

Forecast the backlog iteratively: $$\hat{\text{backlog}}_t = \hat{\beta}0 + \sum{i=1}^p \hat{\phi}i \cdot \text{backlog}_{t-i} + \hat{\beta}1 \cdot \text{employees}_{t-1} + \hat{\beta}2 \cdot \hat{\text{neworders}}_{t-1} + \sum{j=1}^q \hat{\theta}j \hat{\epsilon}_{t-j}$$

From here, you can see the marginal impact of adding a new employee on reduction in backlog (i.e. the estimated regression coefficient). Note that this will not be causal, but rather associative.

Conclusion: Can someone help me understand if these statistically valid/legitimate modelling strategies - or is not how statistical modelling is done? Can the predictor variable itself was the response variable in a previous model. Statistically speaking, I am not sure if this is permissible (i.e. big error propagation, impossible to calculate variance, etc.). Is there a better way to model this?