SPSS Statistics

 View Only
  • 1.  Excluding Rows of Data

    Posted Wed March 01, 2023 11:03 AM

    Is there a way to exclude a row of data from an analysis in SPSS, other than just cutting the row out of the spreadsheet?



    ------------------------------
    Robert Cale
    ------------------------------


  • 2.  RE: Excluding Rows of Data

    Posted Wed March 01, 2023 11:08 AM

    Yes. Consider using the SELECT IF command. In syntax, that could look like this...

    ** Assume that you have unique IDs for each subject (or row), and that the variable is called "ID". You want to exclude case (row) number 322 in a FREQUENCY command.

    SELECT IF (ID ne 322).

    FREQUENCIES VARIABLES=<varlist>.

    ** Note that the selection above remains in force from then on, as long as this datafile is open. If you wanted it just for that one FREQUENCIES command, precede the SELECT IF command with the TEMPORARY command:

    TEMPORARY.

    SELECT IF (ID ne 322).

    FREQUENCIES VARIABLES=<varlist>.

    ** From here on, case 322 is included in analyses/transformations/etc.

     



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