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
Related Posts with Duplicating time observations in panel data in stata
how to surpress the "graphs by group" when graphing histogram with by optionI do not want to display "graphs by group", Here is the code: Code: * Example generated by -dataex…
Stata file to learn fromHello all, I am trying to learn Stata, and I was wandering if you have a Stata file (containing a sa…
Instrumental VariablesHello Experts, I am employing GMM approach on dynamic panel model. There are three endogenous variab…
How to filter data using keywordsHi everyone, I am a novice user of STATA. I have collected execucomp data on excel, where manager d…
METAN command on log-transformed odds ratiosDear Statalist Member, I have several Effect Sizes (ES) with accompanied 95% Confidence Intervals (…
Subscribe to:
Post Comments (Atom)
0 Response to Duplicating time observations in panel data in stata
Post a Comment