Hi all,
I have 2 panel datasets, one for men and one for women, and I want to combine them together. So I used to Append option.
However, when I use
function for a fixed-effects model including the gender, the effect of gender got estimated, which is weird because it is supposed to be omitted due to the use of
option. So I thought there might be some gender changes for some individuals, or it could be because of a genuine error from the data itself.
So I went back to check the IDs for each sample to see if there was anyone with the same IDs but with a different gender. So I did it by taking the difference in IDs, if the difference is 0, then that ID appears in both samples. However, it turns out that none of the differences are 0. Each sample has a different set of IDs, which means no one changes their gender over time or has no errors.
So I think i have done something wrong with the Append function, here is my code:
I do not think I got the codes wrong but my blood is boiling at the moment because my 2-cell brain could not figure out why gender got estimated in the fixed-effect model.
Could anyone please let me know if I am doing something wrong :<
Thank you.
I have 2 panel datasets, one for men and one for women, and I want to combine them together. So I used to Append option.
However, when I use
Code:
xtreg, fe
Code:
xtreg, fe
So I went back to check the IDs for each sample to see if there was anyone with the same IDs but with a different gender. So I did it by taking the difference in IDs, if the difference is 0, then that ID appears in both samples. However, it turns out that none of the differences are 0. Each sample has a different set of IDs, which means no one changes their gender over time or has no errors.
So I think i have done something wrong with the Append function, here is my code:
Code:
use men_data.dta, clear append using women_data.dta
Could anyone please let me know if I am doing something wrong :<
Thank you.
Comment