Dear All, I find this question here. The data set is:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input double(age cognlab)
48 3
50 2
59 2
62 2
50 2
48 2
63 2
55 1
69 2
70 3
83 2
81 1
83 1
58 1
61 2
47 3
47 3
59 1
67 1
59 2
53 2
56 2
51 2
49 2
57 1
64 2
52 1
47 1
55 2
59 2
59 2
68 2
56 1
53 1
59 1
55 2
48 1
47 3
46 1
43 2
47 1
49 1
66 2
46 2
45 2
63 1
62 1
47 3
57 1
64 2
58 1
72 1
56 2
61 1
45 2
41 3
54 2
56 2
67 1
59 1
59 2
48 1
52 2
49 2
56 2
73 2
70 1
61 2
80 1
76 1
63 1
50 2
58 2
50 3
52 2
66 1
59 2
60 1
54 2
55 2
48 2
75 2
66 2
59 2
58 2
74 1
62 2
60 2
64 2
67 1
51 2
51 2
53 2
70 1
70 2
61 2
61 2
67 1
61 1
56 1
end
  1. The end is to draw a graph like below: Array
  2. Age in on the horizontal axis, with three groups. The first group is 45-60, the second group is 60-75, and the third group is age > 75.
  3. The variable on the vertical axis is `cognlab', which has only three values, i.e., 1,2, and 3.
  4. Any suggestions are appreciated.