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
Reshape wide with different number of observations for each valueHello, I am trying to run a 'reshape wide' with this dataset but it does not work: https://databank…
xsmle error spatial weighting matrix "is not a valid spmat object"Dear readers, I have a balanced panel data on 41 countries over 39 years. I merged the data with a s…
appropriate data for QUAIDSDear all, in my thesis I want to conduct a study about a GHG-tax on animal products and its effects…
Using data labels previously stored after reshape commandDear Statalisters, I am using Stata 16 and working with the following dataset: input byte Bank str…
covert string variable into data Hello, how can I covert this string variable into Date to be like 2021-06-30 Code: * Example gen…
Subscribe to:
Post Comments (Atom)
0 Response to Delete panel observations which are nonconsecutive data
Post a Comment