SPSS Statistics

 View Only
  • 1.  If command

    Posted Fri May 14, 2021 02:17 PM
    This is possibly a very stupid question. I'm trying to adjust some scores in SPSS. When I run a line such as

    IF (Disclosure=169 OR Disclosure=170 OR Disclosure=171) Del_Dx_BR=Del_Dx_BR-10.

    Nothing changes. What am I doing wrong? Is it the OR command, or the subtraction? I'm not getting any error messages so I can't figure out what to fix.

    ------------------------------
    Abigail Yuen
    ------------------------------

    #SPSSStatistics


  • 2.  RE: If command

    Posted Fri May 14, 2021 02:50 PM
    * Let's try an example and see what happens.
    * Here are some fake data as an experiment.

    data list free /disclosure Del_Dx_BR.
    begin data.
    168 10
    169 12
    170 14
    171 16
    172 18
    end data.

    *Now, list out the data before the transformation.

    LIST.

    * Run the IF statement.

    IF (Disclosure=169 OR Disclosure=170 OR Disclosure=171) Del_Dx_BR=Del_Dx_BR-10.

    * Pass the data with the LIST command (which also lists the values).

    LIST.

    You could use EXECUTE or some other command, like LIST or FREQUENCIES. There are many dozens of other procedures or commands that will pass the data and execute the transformation. I think what happened is that you ran the IF statement but then never ran the pending transformation, as I did.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------