The aim of this recipe is to introduce a basic forecasting method that relies on linear regression. We are going to use a built-in Tableau facility for linear regression. Simply put, regression analysis helps us discover predictors of a variable that we are interested in. We model the relationship between potential predictors and our variable of interest. Once we establish the model of the relationship between predictors and our variable, we can use it for further predictions.
To perform for casting, we will use the hormonal_response_to_excercise.csv dataset. This dataset comes from a health behavior study that aimed to explore the factors influencing cortisol response while exerting the maximal, peak effort during physical exercise (the Cortmax variable in our dataset).
Our first task is to explore how effectively we can predict the level of cortisol response in the point of maximal effort during physical exercise, based on the cortisol level at rest (the Cortrest variable). So, in this example, our variable of interest (variable we are trying to predict) is Cortmax (cortisol level during maximal effort), while our predictor variable (the one that we are using to make a prediction) is Cortrest (cortisol level during rest). We will try to model the relationship between these two variables.