IBM TechXchange Group

TechXchange Group

Your hub for all things community! Ask questions, connect with fellow members, get the support you need, and stay informed with the latest updates.

 View Only

Outlier ID Formula in SPSS Statistics Prepare Data for Modelling

  • 1.  Outlier ID Formula in SPSS Statistics Prepare Data for Modelling

    Posted Thu May 09, 2024 10:04 AM

    Does anyone know how SPSS resets the actual the mean and standard deviation when you replace outliers with for example 3 St Deviations in the Auto Data Prep module.  The syntax that shows the procedure actual lowers the actual mean to another value before it applies the 3 STD adjustment.  Looks like some type of trimming or other adjustment to get to a different mean & SDev. The mean and standard deviation in the outlier adjustment code does not match the original means and standard deviations for the variables. I am looking for what formula is used to get to the different mean & StDev they use in the syntax.

    I have to explain to a client how it is calculated. Please help if anyone can. Or direct me to someone who might know.

    Below is the syntax, but the total mean and SD were higher.

    *Interactive Data Preparation.
    COMPUTE #MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT_Outlier = $SYSMIS.
    DO IF (MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT < 1617.62946991648-3508.74610065027*3).
    COMPUTE #MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT_Outlier = 1617.62946991648-3508.74610065027*3.
    ELSE IF (MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT > 1617.62946991648+3508.74610065027*3).
    COMPUTE #MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT_Outlier = 1617.62946991648+3508.74610065027*3.
    ELSE.
    COMPUTE #MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT_Outlier = MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT.
    END IF.
    COMPUTE MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT_transformedTest = (((1/3176.06783869562)*(#MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT_Outlier-1669.24263701691))+0).
    VARIABLE ROLE
      /NONE MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT
      /INPUT MBR_SAV_SUMMARY_TOTAL_TRXN_CREDIT_60DAYS_AMT_transformedTest.
    EXECUTE.



    ------------------------------
    MARTHA REA
    ------------------------------