In any production environment, demand forecasting plays a key role for managing integrated logistics systems. It provides valuable information for several basic logistics activities including purchasing, In-house production, inventory management, transportation etc. There are extensive forecasting techniques available for anticipating the demand, but in this blog let me introduce the different forecasting methodologies at high level and explain causal analysis (Multi-linear regression method) in detail.
Different Forecasting methodologies include
- Subjective Forecasting
- Objective Forecasting
Subjective Forecasting – Qualitative technique
The approach relies most heavily on judgment and educated guesses, since there would be very little data available for forecasting. This is especially the case in long-range forecasting. It’s easy to forecast next week’s forecast, since we’ll have months or years data to forecast. However, if we’re trying to get an idea forecast a product which is about to be 10 years from now, we would not have much quantitative variables to predict a demand for such a long horizon. There is a likelihood for a Change in technology, and political, economic, and social factors occur and change in the course of trends. Hence, the opinion of subject matter experts would be required who have a good intuition about the past sales. There is essentially only one category of subjective forecast approaches which is called “Judgmental” forecasts, such a forecasting model is not available in SAP IBP as the business would never use such an expensive tool to manage forecast with very huge horizon (>3 Years).
Objective forecasting approaches are quantitative in nature and it is chosen when there is an abundance of data. There are three categories of objective forecasting methods: Time series, Classification, and Causal.
Time Series Methods
Time series methods attempts to estimate future outcome based on historical data. In many cases, prior sales of a product can be a good predictor of upcoming sales because of prior period marketing efforts, repeat business, brand awareness, and other factors. Whenever a time series method is chosen then we assume that the future will continue to look like the past. In rapidly changing industries or environments, time series forecasts are not ideal, and may be useless.
Because time series data are historical, they exhibit four components that emerge over time: trend, seasonal, cyclical, and random (or irregular). Before any forecasting is done on time series data, the data must be cleansed to perform downstream analysis.
For Data Cleansing, please refer my previous blog.
The most common time series methods include
Simple moving average
Classification analysis is used when we are intended to predict the outcome of a variable which is categorical, in such cases we to predict the outcome of those variables by using forecast methods such as Decision Trees, Random Forecast etc.
Causal or econometric forecasting methods attempt to predict outcomes based on changes in factors that are intended to impact those outcomes. For example, temperature may be used to forecast sales of ice cream; advertising expenditures may be used to predict sales. It reminds me a Statistical Proverb
“Correlation Doesn’t necessarily need to causation” – Just because two variables are correlated, it doesn’t need to cause each other For Example: During Summer in India, on a particular shop there was a huge sale on sweater from people travelling US, and it doesn’t mean that the same would prevail in next summer. So, Choosing the correct predictor (Dependent) and explanatory (Independent) variable plays an important role
In this blog, I would be explaining in detail about one of the most widely used Casual analysis Forecast model called “Multi-Linear Regression”.
Regression: Regression helps us to find the relationship between two variables, unlike correlation it shows the trend that exist between two variables.
Simple Linear Regression:
The Simple Linear Regression uses one explanatory (Independent) variable which helps us to predict the predictor (Independent) variable. Based on the trend of an explanatory variable, the predictor variable would either be on an increasing or decreasing trend.
The Line that passes over the above graph’s are nothing but the “Line of Best Fit or the Regression Line”
Line of Best Fit: The line of best fit is used to describe the data, and it is used to make predictions.
The Simple Linear Regression is normally computed using the Regression Equation
Y = mx + C
Y – Independent Variable
X – Dependent Variable
M – Slope of the Regression line
C – Y-Intercept of the Regression line
Slope: It explains the change in the value of Dependent variable when there is a corresponding change in the value of Independent variable by one unit.
Y-Intercept: It explains the value of our dependent variable when our independent variable is exactly zero.
The Simple linear regression would serve as base for explaining the Concept of Multi-linear regression used in SAP IBP. Unlike one explanatory (Independent) variable, the Multi-linear regression uses more than one explanatory variable in order to predict a dependent variable.
The most Important thing in any casual analysis is to understand the data. Understanding data means we should be aware of what each variable in the dataset describes. In many cases, not a single variable will cause the dependent variable to either increase or decrease but a combination of the independent variable will cause the dependent variable to either go up or go down.
Key Assumptions when using the Linear Regression technique
- Linearity in data
- Multivariate normality
- Independence of Errors
- Lack of Multi-collinearity
Before choosing a linear regression model, we should find out whether these assumptions are true only if it is true then we should proceed on choosing the model.
Statistical Equation for Multi Linear Regression
Y = m1x1 + m2x2 + m3x3 +…. +mnxn + C
Building a Forecast Model for MLR in SAP IBP
For MLR, adding the key figures for the forecast and ex-post forecast, we need to make the following setting to use the multiple linear regression algorithm in our forecast model
- Variable Selection
- Key figures
- System Generated Features
The setting defines how the system must choose the independent variables that have a significant influence on the forecast. You have the following options:
- Backward Selection (I.e. Backward Elimination)
- Forward Selection
Backward Selection (Backward Elimination)
If you select this option, the system takes all independent variables into consideration at the beginning of the forecast calculation and one by one excludes all factors that are irrelevant for the forecast.
If you select this option, the system starts with one independent variable, then add the others one by one until it identifies all factors that are relevant for the forecast.
This is bit more complicated from technical perspective to compute the results with the forward selection method..
With this method, the system considers all variables to the forecast model.
The independent variables that should be considered by the algorithm as external factors when it calculates the forecast.
Note: The number of historical periods must be 2 more than the number of independent variables as per SAP Recommendation.
Independent variables that are generated on the fly during forecasting. The following features are available:
Slope Dummy – To Consider Trend in the data
If we select this feature, the algorithm can consider the effects of trends on the forecast even when those trends can’t be explained by any known independent variables.
The values of this variable increase by 1 from one period to the other so they form a 45-degree slope in a chart in which axis ‘x’ contains the time periods, axis ‘y’ contains time series values for the input key figure, and the intercept is always 0.
The algorithm multiplies the values of the slope dummy variable with a regression coefficient, which is calculated in a way that the modified values are as close to the historical values as possible.
This allows the system to predict trend values for the future and calculate a forecast that takes the trend into consideration.
Month of the Year – To Consider the Seasonality in the data
If we select this feature, the system creates an additional independent variable during runtime that describes for each period the month to which it belongs. When this variable is added to monthly, weekly or daily data, it helps the system capture some of the seasonal impact that occurs regularly each year (for example, larger sales occur in each December).
It allows the algorithm to come up with monthly estimates for the future forecast.
IBP Configuration-Manage Forecast Models App
In the general tab of Forecasting models app, we will define the periodicity between Day to year based on the Keyfigure selection. No. of Past data will be based on the Historical periods and Independent variables. Future calculation will be based on Forecast periods (Ex: Statistical FCST).
In the above Forecasting step we will define the Input and Target KFs for calculation. For MLR we will also add 1 or more KFs considered as Independent variables. Dependent variable will be our Statistical forecast(output) in the future and historical sales from the past.
MLR output after Forecasting in Excel Planning view
In the above example, Statistical Fcst of Current week is calculated based on change in the Independent variables and Historical data.
Post processing concepts will be covered in separate blogs.
For more Information regarding Multi-linear regression working logic in SAP IBP, please refer the below link