Hello,
I have a panel dataset (2013-2018) in which I want to delete all observation of which I do not have all the observations needed to perform my regression. However, I regress the independent variables of last year on the dependent variable, which means that I have to set 3 different conditions to keep observations:
- for 2013: drop observations for which not all independent variables are available
- for 2014-2017: drop observations for which not all independent variables and the dependent variable is not available
- for 2018: drop only if the dependent variable is not available
I have tried several possibilities by creating conditions within the keep command or by using command egen. However, I do not seem to succeed. Do you have any recommendations? Please let me know if you need any additional information.
Thank you very much.
Kind regards,
Timea
Related Posts with drop missing variables except for one year
What is the difference between "stack" and "pca" ?From my understanding, it seems that pca and stack syntaxes are all about suppressing two or more va…
coefplot plotting results from categorical variableDear all, I would like to use coefplot to compare the coefficients from different models and catego…
Labels of restricted categories appearing in graph when using -by()-I want to graph tobacco use for couples in different value groups. While the values variable has 12 …
What fixed effects I should add when using triple difference in firm level?In my difference-in-difference setting (double diff), I examine the impact of anticorruption laws on…
Is there any package for stacked event-by-event estimates ?I am reading a paper of Cengiz, 2019 about using stacked event-by-event estimates for the Difference…
Subscribe to:
Post Comments (Atom)
0 Response to drop missing variables except for one year
Post a Comment