Hello Stata community,
I am looking to duplicate the time observations in a panel data 17 times, whiles keeping the data in long-format in Stata. I have tried the following commands:
expandby 17, by(id) sort(time)
expandby 17, by(id) sort()
In either case, only the last year is duplicated for each country or some years’ observations are duplicated. I would appreciate your feedback on the right code to use
Thanks,
Rex
0 Response to Duplicating time observations in panel data in stata
Post a Comment