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
graph combine | control distance between two combined graphs, of which one is itself a combined graph (working with maps from spmap)Dear Statalisters, I want to control the distance between two graphs that I want to combine. One of…
Interpretation of regression with multiple large dummiesHi all, I have a regression on the effect between Corporate Performance and Corporate Social Respon…
Aggregating panel data to a weighted average mean by year and regionHello, I hope you are all doing fine! I have a panel dataset with over a thousand firm IDs and 397…
String into numerical but didn't work. destring ANOPRIDI, generate (date_dx) ANOPRIDI: contains nonnumeric characters; no generate . d A…
Stored critical values of a DF-GLS unit-root test?I'm looking for the stored critical values of a DF-GLS unit-root test for a certain "maxlag". All I …
Subscribe to:
Post Comments (Atom)
0 Response to drop missing variables except for one year
Post a Comment