I am unfamiliar with stata and need it for my thesis. I am having some problems with my panel data. I currently have panel data for 4200 people between the years 2008 and 2022. However, I have missing data. There are two variables that are often missing. What I would like to do is:
1. See how often someone is missing data. So, per person see how often they have one or more variables missing. If it happens in more than 20% of the years for that person, I want to delete this person.
2. After I have done this, I want to impute the missing values. I have used mi set, and registered my imputed and regular data. Which next steps do I take? Does it matter how many imputations I add? What is the correct command for this? After I have done this, can I see the imputed values in the data in stata? Because I have tried a few things, but I never seem to see imputed data in my data if I type browse.
3. After doing this, I want to run a xtivreg on the data. It is a normal OLS regression, with first an instrumental variable regression to show there is a relation between my dependent and independent variable.
Thank you in advance for the help.
1. See how often someone is missing data. So, per person see how often they have one or more variables missing. If it happens in more than 20% of the years for that person, I want to delete this person.
2. After I have done this, I want to impute the missing values. I have used mi set, and registered my imputed and regular data. Which next steps do I take? Does it matter how many imputations I add? What is the correct command for this? After I have done this, can I see the imputed values in the data in stata? Because I have tried a few things, but I never seem to see imputed data in my data if I type browse.
3. After doing this, I want to run a xtivreg on the data. It is a normal OLS regression, with first an instrumental variable regression to show there is a relation between my dependent and independent variable.
Thank you in advance for the help.
Comment