SPSS Statistical Graphing Tutorial: Percentage Bar Graph Stacked Bar Graph

1. Questions and data

A researcher wants to see the percentage composition of different degrees of vitamin D deficiency (VD) in different age groups (Age_cat). Some data are shown in Figure 1. The researcher wants to display it in the form of a bar graph, how should he do it?

 

Figure 1 Part of the data

2. Specific operations (Chinese version of SPSS)

(1) Click Graphics----Chart Builder on the main interface to open the "Chart Builder" dialog box. Select the stacked bar chart in the lower left bar chart (the third one)

 

Figure 2 Chart Builder

 

(2) Drag the stacked bar chart into the chart preview pane

Figure 3 Drag the stacked bar chart to the preview window

 

(3) Drag the age (Age_cat) into the X axis, and drag the vitamin D deficiency status (VD) into the stacking box on the right

 

Figure 4 Drag variables to the stacked bar chart

 

(4) Click Element Properties to open the Element Properties dialog box. First, select "Bar Chart 1" in the "Edit the properties of the following objects" box. Second, click the drop-down menu in the "Statistics" box and select "Percent ()", click "Set Parameters" and select "Total for each X-axis category", then click "Continue". Click "Apply" to save the settings.

 

Figure 5 Setting stacked bar chart parameters

 

(5) After all settings are completed, click and click OK.

3. Drawing results

The final stacked bar chart is as follows:

 

Figure 6 Stacked bar chart of age and vitamin D deficiency status

Guess you like

Origin blog.csdn.net/m0_72494332/article/details/132642899