Dear statalist,
I try to analyze democratization episode, which I differentiate into the beginning of an episode and the end of an episode. In my example (see below), I would like to dichotomize NA and the beginning of an episode (years), where NA should be 0 and e.g. 1977 should be 1. Moreover I would like to create a variable, where the current episode is not taken into account. It means that only the first year should be a 1. The other years of the episode should be missings.
In Mexico, for example, the episode began in 1977 (until 2001). I want the year 1977 (row 3) to count as 1, row 4 to 22 as missings and all the NA to count as 0 (same with Suriname and Ghana).
1 "Mexico" "NA"
2 "Mexico" "NA"
3 "Mexico" "1977"
4 "Mexico" "1977"
5 "Mexico" "1977"
6 "Mexico" "1977"
7 "Mexico" "1977"
8 "Mexico" "1977"
9 "Mexico" "1977"
10 "Mexico" "1977"
11 "Mexico" "1977"
12 "Mexico" "1977"
13 "Mexico" "1977"
14 "Mexico" "1977"
15 "Mexico" "1977"
16 "Mexico" "1977"
17 "Mexico" "1977"
18 "Mexico" "1977"
19 "Mexico" "1977"
20 "Mexico" "1977"
21 "Mexico" "1977"
22 "Mexico" "1977"
23 "Suriname" "NA"
24 "Suriname" "NA"
25 "Suriname" "NA"
26 "Suriname" "NA"
27 "Suriname" "NA"
28 "Suriname" "NA"
29 "Suriname" "1987"
30 "Suriname" "1987"
31 "Suriname" "1992"
32 "Ghana" "1946"
33 "Ghana" "1946"
34 "Ghana" "NA"
35 "Ghana" "NA"
36 "Ghana" "NA"
37 "Ghana" "NA"
38 "Ghana" "1957"
39 "Ghana" "1957"
40 "Ghana" "NA"
41 "Ghana" "NA"
I try to analyze democratization episode, which I differentiate into the beginning of an episode and the end of an episode. In my example (see below), I would like to dichotomize NA and the beginning of an episode (years), where NA should be 0 and e.g. 1977 should be 1. Moreover I would like to create a variable, where the current episode is not taken into account. It means that only the first year should be a 1. The other years of the episode should be missings.
In Mexico, for example, the episode began in 1977 (until 2001). I want the year 1977 (row 3) to count as 1, row 4 to 22 as missings and all the NA to count as 0 (same with Suriname and Ghana).
1 "Mexico" "NA"
2 "Mexico" "NA"
3 "Mexico" "1977"
4 "Mexico" "1977"
5 "Mexico" "1977"
6 "Mexico" "1977"
7 "Mexico" "1977"
8 "Mexico" "1977"
9 "Mexico" "1977"
10 "Mexico" "1977"
11 "Mexico" "1977"
12 "Mexico" "1977"
13 "Mexico" "1977"
14 "Mexico" "1977"
15 "Mexico" "1977"
16 "Mexico" "1977"
17 "Mexico" "1977"
18 "Mexico" "1977"
19 "Mexico" "1977"
20 "Mexico" "1977"
21 "Mexico" "1977"
22 "Mexico" "1977"
23 "Suriname" "NA"
24 "Suriname" "NA"
25 "Suriname" "NA"
26 "Suriname" "NA"
27 "Suriname" "NA"
28 "Suriname" "NA"
29 "Suriname" "1987"
30 "Suriname" "1987"
31 "Suriname" "1992"
32 "Ghana" "1946"
33 "Ghana" "1946"
34 "Ghana" "NA"
35 "Ghana" "NA"
36 "Ghana" "NA"
37 "Ghana" "NA"
38 "Ghana" "1957"
39 "Ghana" "1957"
40 "Ghana" "NA"
41 "Ghana" "NA"
Comment