I want to create a loop to append multiple waves of panel data. Most vars appear in each wave, three additional vars only appear in 4 waves. Should I therefore create two separate loops to append the waves?
I understand when appending waves the vars names need to be the same. In the panel data I have, a prefix is added to each varname to reflect the wave (age in wave 1 is aage, year 2 is bage, year 3 is cage), and for appending the vars need to have the same name. So can we code the removal this prefix within the loop to append the waves? And if not, how would I go about coding this?
Using the source datafile I save the renaming vars to a temp datafile, then save the appending to a new datafile, right? Some clarity in the code on this would be appreciated.
Thank you in advance.
Related Posts with Using a loop to append multiple waves of data
Generating residuals with miHi all, On p. 296 of the Stata 16 MI manual, the following is stated: The MI predictions shoul…
Regression Command for pooled DataHi.. I have four countries cross section data in my sample. i regressed separate regression for each…
Table CreationHey Statalists, I have data with variable named district, hospital name and total number of cases ha…
Help Reshaping/Merging dataDear all, I am using Stata 16, on mac. Here is snapshot of a piece of my dataset. I have collected d…
GPH files compatibility: Stata 15 and 16Hi everyone, I am trying to open .gph files created in Stata 16 using Stata 15. However, I get this…
Subscribe to:
Post Comments (Atom)
0 Response to Using a loop to append multiple waves of data
Post a Comment