I have the following data which gives the ID of the mother (newid), birth order of the child (bord) and year of birth of said child (yobch). I declared the data as an unbalanced panel by
Code:
xtset newid bord
Do I need to convert this to a woman-year panel or could I work with the data below. If the latter, how do I create this dummy?
The code I have so far is
Code:
gen polexposure = 0 replace polexposure = 1 if bord >=2 & yobch <= 1977
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float newid byte bord int yobchild 1 1 1985 1 2 1988 2 1 1977 2 2 1985 2 3 1989 2 4 1992 3 1 1967 3 2 1973 3 3 1977 4 1 1989 5 1 1982 5 2 1986 5 3 1991 6 1 1958 6 2 1962 6 3 1964 7 1 1980 7 2 1982 7 3 1984 7 4 1985 7 5 1988 8 1 1985 8 2 1986 8 3 1991 9 1 1984 9 2 1986 9 3 1989 9 4 1991 10 1 1961 10 2 1964 10 3 1965 10 4 1967 10 5 1970 10 6 1971 11 1 1991 12 1 1982 12 2 1985 12 3 1986 13 1 1961 13 2 1964 13 3 1967 13 4 1969 13 5 1971 13 6 1976 14 1 1988 14 2 1991 15 1 1983 16 1 1991 17 1 1986 17 2 1989 17 3 1992 18 1 1979 18 2 1982 18 3 1987 19 1 1965 20 1 1978 21 1 1979 21 2 1983 21 3 1986 22 1 1959 22 2 1960 22 3 1961 22 4 1962 22 5 1963 22 6 1964 22 7 1965 23 1 1984 23 2 1988 24 1 1981 24 2 1984 24 3 1988 25 1 1988 26 1 1983 26 2 1986 26 3 1989 27 1 1960 27 2 1962 27 3 1968 27 4 1971 27 5 1980 27 6 1982 28 1 1956 28 2 1959 28 3 1963 28 4 1966 28 5 1973 28 6 1978 29 1 1983 29 2 1984 29 3 1987 30 1 1981 30 2 1982 30 3 1985 30 4 1987 31 1 1967 31 2 1969 31 3 1970 31 4 1973 31 5 1974 32 1 1987 end
0 Response to Panel data dummy variable dependent on the "time" variable of the panel
Post a Comment