Hello all,
I have the following problem. I am using a panel database where individuals, among other things, are asked about their gender. After running some models it appears to me that some of them did not report the right gender (maybe by mistake). My database is unbalanced, some people appear only once, and some up to eight (8) times.
Now, for the sake of an example assume that we have only three people and only three years. We have the following variables:
year id gender gender_id
t1 1 M 1M
t2 1 F 1F
t3 1 F 1F
----------------------------------------------
t1 2 M 2M
t2 2 M 2M
t3 2 M 2M
----------------------------------------------
t1 3 F 3F
t2 3 F 3F
t3 3 F 3F
Above, the variable gender_id is the concatenation of "id" and "gender". As it can be seen from this example, the first individual has falsely reported her gender in t1.
I am asking if there is a way to identify these individuals, via a dummy variable for example, in order to act accordingly when I estimate my models. That is, how to create a dummy that asserts the value 1 when id = 1 in the above example?
Thank you in advance.
I have the following problem. I am using a panel database where individuals, among other things, are asked about their gender. After running some models it appears to me that some of them did not report the right gender (maybe by mistake). My database is unbalanced, some people appear only once, and some up to eight (8) times.
Now, for the sake of an example assume that we have only three people and only three years. We have the following variables:
year id gender gender_id
t1 1 M 1M
t2 1 F 1F
t3 1 F 1F
----------------------------------------------
t1 2 M 2M
t2 2 M 2M
t3 2 M 2M
----------------------------------------------
t1 3 F 3F
t2 3 F 3F
t3 3 F 3F
Above, the variable gender_id is the concatenation of "id" and "gender". As it can be seen from this example, the first individual has falsely reported her gender in t1.
I am asking if there is a way to identify these individuals, via a dummy variable for example, in order to act accordingly when I estimate my models. That is, how to create a dummy that asserts the value 1 when id = 1 in the above example?
Thank you in advance.
Comment