Hi,

My dataset has variables such as province, and five other items (club church library hospital school) which are coded as yes/no.
Firstly I want to create a matrix of the five items using the following code, but not being able to store them as a new variable (services):
Code:
mkmat club-school, matrix(a)
matrix list a
My second goal is to create a barchart showing the percentage of 'yes' for all the 5 items (as if 5 categories of a single variable) across provinces.

Thanks for your help in advance!

Code:
input byte(province club church library hospital school)
35 1 0 1 1 0
53 1 0 0 0 0
35 1 0 1 1 1
52 1 0 1 0 0
35 1 0 1 0 1
33 1 0 1 1 1
11 1 1 1 1 1
19 1 0 1 1 1
73 1 0 1 0 0
81 1 0 1 0 0
64 1 0 1 1 0
12 1 0 1 0 0
73 1 0 1 1 0
32 1 0 1 1 0
14 1 0 1 1 1
33 1 0 1 1 1
53 1 1 1 0 0
16 1 0 1 1 1
81 1 0 1 0 0
34 1 1 1 1 1
32 1 0 1 1 0
32 1 0 1 1 0
64 1 0 1 1 0
32 1 0 1 1 0
32 1 1 1 1 0
33 1 0 1 0 1
53 1 0 0 0 0
35 1 0 1 0 1
12 1 0 1 1 1
62 1 0 1 1 1
74 1 0 1 1 0
81 1 . 1 1 1
33 1 0 1 1 1
53 1 0 0 0 0
34 1 0 1 0 1
34 1 1 1 0 1
73 1 0 1 1 0
12 0 0 0 0 0
36 1 0 1 0 0
35 1 0 1 0 0
32 1 0 1 1 0
12 1 0 1 0 0
31 1 0 1 1 0
73 1 0 1 1 1
32 1 0 1 1 1
19 1 0 1 1 0
32 1 1 1 1 0
53 1 0 0 0 0
12 0 0 0 0 0
15 1 0 1 0 0
35 1 1 1 1 1
65 1 0 1 1 0
74 1 0 0 0 0
51 1 0 1 0 0
65 1 0 1 0 0
71 1 0 1 1 0
52 1 0 1 0 0
64 1 0 1 0 0
53 1 0 0 0 0
74 1 0 1 0 0
65 1 0 1 0 0
33 1 0 1 1 0
14 7 7 7 7 7
73 1 0 1 1 0
91 1 0 0 0 0
74 1 0 1 1 0
14 1 0 1 1 1
74 7 7 7 7 7
11 1 0 1 0 0
52 1 0 1 1 1
82 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