SPSS Statistics

SPSS Statistics

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

 View Only
Expand all | Collapse all

How do I include categories with no entries in a percentage histogram?

  • 1.  How do I include categories with no entries in a percentage histogram?

    Posted Mon February 15, 2021 11:26 PM

    [This question has been answered here for v18. The guidance does not seem to apply to v27, so re-asking here.]

    I have a categorical variable which I would like to display in a bar chart. However, one of my categories was not selected by any of my respondents. I can generate a frequency distribution and bar chart for this variable, but the unselected category is not included. How can I both generate a frequency distribution to show a zero count for this category, as well as generate a bar chart which also reflects a zero frequency?






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: How do I include categories with no entries in a percentage histogram?

    Posted Mon February 15, 2021 11:50 PM

    A bar chart and a histogram are different things. Histograms have a scale axis and automatically cover the entire range of the data. Bar charts have a categorical axis and may or may not include all possible data values.

    To get zero-count values included in a bar chart, make sure that all the possible values have value labels, Then by default empty categories will show up as long as you are using GGRAPH (Chart Builder) or CTABLES. These commands also provide the options of excluding empty categories.






    #SPSSStatistics
    #Support
    #SupportMigration