I have monthly time-series data for 4435-panel ids. Time series should be for consecutive months. However, for some panels, I find a gap in monthly data. I can find the observations of panels, for which there is a time gap by taking the difference of the current month and lagged current month. I can delete those observations of which difference is null (.) or not 1. But my problem is that, if I delete observation in this way, I lose one observation per panel from which consecutive data starts. I want to keep that observation from which consecutive data starts but I find no way to handle this after exploring all threads.
For example: for FUNDNO = 38, I have missing consecutive observations from June 1989-Dec 1996. But it has consecutive observations from May 1997. How can I drop those non-consecutive observations only for (i.e. from June 1989-Dec 1996) except May 1997 from which consecutive data starts, for each panel?
Array
I appreciate your support. Thank you very much in advance.
Related Posts with Delete panel observations which are nonconsecutive data
How to define treatment & control groups properly?I’m working on a project examining the effect of a 2016 cash transfer on fertility. Who is eligible…
Extract country names from affiliationsHi, I have a dataset of about 1000 articles with variables such as id, title, abstract and affiliat…
What miss option means in gunique ?Deat Stata user, I found this gunique function, and using the same variable list I got different tot…
CI Decmposition Results not Showing percentage contributionHi All, I am using Stata 16 and trying to decompose the concentration index but the results show no…
synth_runner automatically generated predictorvarsI am using synth_runner in STATA 17. I got the exact same results when I run two specifications. dep…
Subscribe to:
Post Comments (Atom)
0 Response to Delete panel observations which are nonconsecutive data
Post a Comment