因为是Stata新手,对于这种数据transforming问题不是很了解。这是这周作业的一个问题,谢啦:)
To give an example, suppose that n = 5 (trials) and y = 2 (success) for a given university. The
resulting binary sequence could be 1,1,0,0,0. Write a program to convert the binomial data
(grouped data) into binary data.
Trial Success
8 1
9 3
16 1
13 6
8 2
9 2
29 10
5 2
7 5
8 4
7 4
7 5
10 4
5 1
6 3
7 2
9 4
6 1
5 2
7 2
5 4
5 1
6 3
5 4
6 5
12 5
6 2
5 3
8 5
5 3
10 8
7 4
86 33
12 7
29 21
19 5
10 6
10 8
14 9
18 16