I am working on an analysis of coping mechanisms for a project I am working on. I have each coping mechanism in a different variable and want to make a pie chart to visually represent how many people are using each coping mechanism but I do not know how to do that.
The data looks like this
data test;
input cope_1 cope_2 cope_3 cope_4;
datalines;
0 1 1 0
1 1 0 0
1 0 0 0
0 0 1 1
0 1 0 1
1 1 1 1
0 0 0 1
1 0 1 1
0 0 1 0
;
run;
I know I can use proc gchart with a pie option to create different pie charts for each coping variable and was able to successfully do that with the below code but I want one pie chart for all 4 variables
proc gchart data=test;
pie cope_1 cope_2 cope_3 cope_4 / other=0
value=none
percent=arrow
slice=arrow
noheading
plabel=(font='Albany AMT/bold' h=1.3);
run;
quit;