KNOWLEDGE BASE

How to Export the Residual of Linear Regression Model Other Than Access


Pubblicato: 21 Jul 2022
Data dell'ultima modifica: 17 Apr 2023

Domanda

How to export Residuals data of a Linear Regression Model in another format than Access.

For example, when you export the data of the Linear Regression plot graph as Data(Access),
User-added image

It will show Prediction and Residual in the export file.
User-added image

It will not show Prediction and Residual in Crosstab(Excel) export file.
User-added image

 

Ambiente

  • Tableau Desktop
  • Windows
  • MacOS

Risposta

The ability to export Residuals data of a Linear Regression Model in another format than Access is not currently built into Tableau Desktop.
Instead of outputting the residual data, you can create formulas for the forecast and residuals in the original workbook, which can be used in the same way as Access data

The formulas required are as follows

1. slope: [correlation] * ([std deviation of y] / [std deviation of x])
User-added image

2. y-intercept: Avg[y variable] – [slope] * Avg[x variable]
User-added image

3. Prediction: {[slope]} * [x] + {[y-intercept]}
User-added image

4. Residual: observed y - predicted y
User-added image

The Residuals from the above calculations are the same as the output data in Access.
User-added image

Please also check the attached workbook for details.

Ulteriori informazioni

To voice your support for the inclusion of this feature in the future release of the product, vote for the following idea on Community.
show trend model & residual or export the details
https://community.tableau.com/s/idea/0874T000000HB88QAG/detail
Con questo articolo hai risolto il problema?