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

Making a stacked histogram or bar chart with years on X axis

  • 1.  Making a stacked histogram or bar chart with years on X axis

    Posted Thu January 28, 2021 03:34 AM

    I'm looking at how courts have handled a particular kind of claim over time. We can label each decision Won or Lost. There are several decisions in each year over many years. I would like to do two things:

    1. Make a histogram or bar chart showing, for each year, a stack of Won and Lost. This will make it easy to visualize changes in volume of cases and in proportionate outcomes at the same time.
    2. I would like to group the years together into 5-year bundles.

    I just can't figure out how to make SPSS do this. Any suggestions?






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: Making a stacked histogram or bar chart with years on X axis

    Posted Thu January 28, 2021 08:21 PM

    Using the Chart Builder, select a stacked bar chart. Put year on the x axis. With a variable that is 1 or 0 according to the output, put it in the stack box.

    If you want to group years, use AGGREGATE breaking on year and choose sum and number of cases as the functions






    #SPSSStatistics
    #Support
    #SupportMigration


  • 3.  RE: Making a stacked histogram or bar chart with years on X axis

    Posted Thu January 28, 2021 09:44 PM

    Aha! The box in question says, "Stack: set color" so I figured it was about appearance, not data. I kept moving the variable into the "Histogram" box on the left, and found the OK button greyed out.

    I don't know how to use AGGREGATE yet but I'll try to learn it myself before bothering the community further.

    Thanks very much! I appreciate the help.






    #SPSSStatistics
    #Support
    #SupportMigration