How to merge cases detected in the casewise outlier plot with the input data in multiple regression?

How to merge cases detected in the casewise outlier plot with the input data in multiple regression?

book

Article ID: KB0074329

calendar_today

Updated On:

Products Versions
Spotfire Statistica 12.7 and later

Description

When you find outliers by the casewise outlier plot in the multiple regression, you may want to merge them with the original input data. This article shows an example of achieving this task by the example data Poverty.sta 

 

Issue/Introduction

How to merge cases detected in the casewise outlier plot with the input data in multiple regression?

Resolution

WORKAROUND 1

Writing your own SVB macro to finish this task

WORKAROUND 2:

1. Select File|Open Examples and navigate to the Poverty.sta under the "Datasets" folder
2. Select Statistics|Multiple Regression 
3. Under the Quick Tab in the analysis dialog, click "Variables" to choose "POP_CHNG" as the Dependent variable and the remaining as the Independent variables and click "OK" in the variable selection dialog
4. Click "OK" again the analysis dialog
5. Select "Residuals/assumptions/prediction" tab in the results dialog and click "Perform residual analysis"

6. Select Outliers tab under the Residual Analysis dialog and leave the option as default("Standard residual > 2* signma" is checked under "Type of Outlier") 

7. Click "Casewise plot of outliers" to display the outlier cases having Standard residual > 2* signma 

8. The min, max, mean and median of standard residuals are also displayed, detele those rows in this example(Note: you can also keep them)

9. In order to merge the data by case names, the residual dots after the case IDs(in red box) need be trimmed 
10. Select Data|Names(under cases group) to access "Case Names Manager" dialog

 

11. Set the "Case name length" to be equal to the maximum length(or max length +2 to be safe) of all your case names (The length needs be large enough to not trim your real case IDs) 
12. Set the "Case header width" to trim the dot plot in the case headers and Click "OK"
After trimming the length of case name and case header, the case names in residual plot display real case ID value with shorter headers 

 

13. Select Data|Merge|Merge Options, check "Mathch casenames" under Mode  
14. Select the path of "Proverty.sta" as File 1 and "Standard Reisual.POP_CHNG" data as File 2 and click "OK"

15. A new spreadsheet with merged data from input data and residual data will be generated. Non-outliers have blank in the residual related columns.