Using Stata 14, I have data on frequency (0Never, 1Often, 2Sometimes) of consuming 4 types of tea (Green, Black, Oolong, Puerh) across Region (10 types)
[CODE]
I want to create a graph like one below to show the percentage of never consuming the 4 types of tea by Region. On the following graph, the types of care correspond to the types of tea on x-axis and the disease conditions correspond to Region on y-axis.
[CODE]
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(Age GreenTea BlackTea OolongTea PuerTea Grade) float s byte Region 44 0 0 0 0 6 2 2 31 0 0 0 0 4 2 1 38 0 0 0 0 5 2 1 30 0 2 0 0 4 2 1 19 2 2 2 2 1 2 1 31 0 0 0 0 4 2 1 38 1 2 0 1 5 2 1 47 2 2 0 0 7 2 6 36 0 0 0 0 5 2 6 39 0 0 0 0 5 2 10 43 0 0 0 0 6 2 10 44 0 0 0 0 6 2 10 45 2 2 2 2 7 2 11 38 0 0 0 0 5 2 10 27 0 0 0 0 3 2 10 24 0 0 0 0 2 2 9 39 0 0 0 0 5 2 9 27 0 0 0 0 3 2 1 21 1 2 2 2 2 2 1 27 0 0 0 0 3 2 1 41 2 0 0 0 6 2 1 40 0 0 0 0 6 2 3 21 0 0 0 0 2 2 3 41 0 0 0 0 6 2 3 33 0 0 0 0 4 2 3 25 0 0 0 0 3 2 3 20 0 2 0 0 2 2 13 23 0 0 0 0 2 2 13 28 0 0 0 0 3 2 4 30 2 2 2 2 4 2 4 37 0 2 0 0 5 2 4 33 0 0 0 0 4 2 12 41 0 0 0 0 6 2 12 28 0 0 0 0 3 2 12 28 0 0 0 0 3 2 2 39 2 2 1 2 5 2 2 43 2 2 2 2 6 2 2 38 0 0 0 0 5 2 2 38 0 0 0 0 5 2 13 28 0 0 0 0 3 2 13 24 0 0 0 0 2 2 13 34 0 0 0 0 4 2 6 37 0 0 0 0 5 2 6 24 0 0 0 0 2 2 6 26 0 0 0 0 3 2 3 47 1 1 0 2 7 2 3 34 1 1 1 1 4 2 3 29 0 0 0 0 3 2 9 21 0 0 0 0 2 2 9 27 0 0 0 0 3 2 9 38 0 0 0 0 5 2 4 26 0 0 0 0 3 2 4 43 0 0 0 0 6 2 7 22 0 0 0 0 2 2 7 37 0 2 2 0 5 2 13 33 0 0 0 0 4 2 13 35 2 0 2 2 5 2 13 32 2 2 0 0 4 2 13 17 0 0 0 0 1 2 13 36 0 2 0 0 5 2 13 31 0 0 0 0 4 2 2 43 0 0 0 0 6 2 10 37 0 0 0 0 5 2 10 41 0 0 0 0 6 2 10 41 0 0 2 2 6 2 10 48 0 0 0 0 7 2 10 31 0 0 0 0 4 2 11 26 0 0 0 0 3 2 11 20 0 0 0 0 2 2 5 31 0 2 0 0 4 2 5 42 0 2 2 2 6 2 5 24 0 2 2 2 2 2 5 40 0 0 0 0 6 2 5 33 0 2 2 0 4 2 5 31 0 0 0 0 4 2 2 34 0 0 0 0 4 2 2 34 0 0 0 0 4 2 2 41 0 0 0 0 6 2 2 32 0 0 0 0 4 2 6 30 0 0 0 0 4 2 6 34 0 0 0 0 4 2 6 46 0 0 0 0 7 2 6 29 0 0 0 0 3 2 6 25 0 0 0 0 3 2 13 39 0 0 0 0 5 2 13 31 0 0 0 0 4 2 13 28 0 0 0 0 3 2 6 49 0 0 0 0 7 2 6 40 0 0 0 0 6 2 6 34 0 0 0 0 4 2 6 30 0 0 0 0 4 2 10 36 0 0 0 0 5 2 10 28 0 0 0 0 3 2 3 48 0 0 0 0 7 2 3 40 0 0 0 0 6 2 3 29 0 0 0 0 3 2 3 25 0 0 0 0 3 2 3 36 0 0 0 0 5 2 3 19 0 0 0 0 1 2 3 40 2 0 0 0 6 2 12 end
I want to create a graph like one below to show the percentage of never consuming the 4 types of tea by Region. On the following graph, the types of care correspond to the types of tea on x-axis and the disease conditions correspond to Region on y-axis.
Comment