SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  Options in SPSS to hide or mask calculations less than a certain value?

    Posted Fri June 03, 2022 02:03 PM
    Edited by System Admin Fri January 20, 2023 04:25 PM

    Hi SPSS Gurus,

    What options are there within SPSS to hide/mask/not display frequencies of variables that are under a certain value? My aim is to prevent displaying counts of variables that are less than a certain number from being displayed in the output. As an example, say I have variables Gender, Location, Salary Bands and there is 3 people in 1 location that have the same salary band & gender but the remaining values are greater than 10. 

    Is there a way to have the output so that instead of reporting 3 for salary and gender that SPSS would replace it with  * or not output it at all. I don't want to round the numbers ?

    I saw the option on cross tab to suppress small values but that doesn't suppress the %, i would like to hide the output row completely .

    Are there options to mask, suppress or at least indicate values that should be deleted

    Thanks
    Michael  



    ------------------------------
    Michael O'Brien
    ------------------------------
    #SPSSStatistics


  • 2.  RE: Options in SPSS to hide or mask calculations less than a certain value?

    Posted Fri June 03, 2022 03:46 PM

    It depends on the procedure you are using.  CTABLES has an option to hide small counts, but that only hides the counts, not any related statistics such as the mean.

    There is an extension command, SPSSINC CENSOR TABLES, that provides a lot more flexibility.  It can hide the censoring statistic, typically count, and any related statistics you want to suppress.  You can choose the censoring statistic and threshold, and it has several other options.

    You can install this via the Extensions > Extension Hub if you don't already have it.  it will appear on the Utilities menu.

    --





  • 3.  RE: Options in SPSS to hide or mask calculations less than a certain value?

    Posted Sat June 04, 2022 02:01 PM
    Thanks Jon, censor tables looks to be what I was looking for. I've been able to censor rows but is there any recommendations for situations on how to deal with totals?
    For example with a likert scale where only 1 row is censored, it would be possible to calculate the censored value by adding up the rest of the values and substracting from the total. Censoring the total wouldn't prevent calculating back from the percentages & totals for the other scales

    ------------------------------
    Michael O'Brien
    ------------------------------



  • 4.  RE: Options in SPSS to hide or mask calculations less than a certain value?

    Posted Sat June 04, 2022 06:07 PM
    Concealing the missing cell values after censoring is a difficult problem to solve in general.  There might be subtotals to deal with and related statistics one could work backwards from to find  the censored values or perhaps totals for a small number of cells.

    Solutions sometimes used include adding a small random value to cells or just the totals including or excluding the censored cells. or censoring more cells so that single cells are not exposed.  Or aggregating up to a level where exposure is an issue.  The best solution will depend on the table structure and the nature of the data.

    The CENSOR TABLES procedure doesn't do any more than censoring cells, but it has a new feature, requested by a customer with many tables to process, that allows a snippet of code to be plugged in to specify the actual censoring text based on the cell values or other criteria, so you could have censored cell values replaced with a random number or have the censoring criteria vary, which would help conceal  values.  For example, you could specify that counts that meet the censoring criterion have values replaced by a random draw from a Poisson distribution with the cell value taken as the mean of the distribution or some other formula.  If the number of censored cells is not exposed, then the total would be noninformative even with the true totals.

    One more possibility, if you want to stick to messing with the totals is to use the STATS TABLE CALC extension command to modify the totals.  It would require a small code snippet to be plugged in, but it could add up the noncensored values or, easier, it could add a random value to each total (that wouldn't require a snippet), since the total of the noncensored values would be misleading anyway.

    I can help you with the snippet construction if you go that way.  Snippets have to be written in Python, but they are typically only a few lines of code.

    --





  • 5.  RE: Options in SPSS to hide or mask calculations less than a certain value?

    Posted Sat June 04, 2022 06:38 PM
    My requirement is to not report the censored value so replacing them with artificial value would just be more explaining. I've been working on the idea of applying the censor step to all tables at the end instead of one by one. Would STATS TABLE CALC be able to handle that way of working and work with each table independently?


    ------------------------------
    Michael O'Brien
    ------------------------------



  • 6.  RE: Options in SPSS to hide or mask calculations less than a certain value?

    Posted Sat June 04, 2022 07:06 PM
    TABLE CALC chooses either ALL or PREVIOUS and  one or more table subtypes, so if they are all similar, you could do it in one command for the whole Viewer contents.  Each table  would be processed independently.  Of course, if the structure varies, it might not be possible to use the same specification on all of them.  TABLE CALC cannot handle tables with true nesting or layers, however.

    --