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
Very large T- StatisticsHi Stata Community, I'm running some regressions using Fixed Effect Methodology. The issue is that t…
Calculate economic significance for censored (Tobit) regression with multiple imputationHi, I'm trying to calculate economic significance from a censored (Tobit) regression with multiple …
10000 posts by William LisowskiCongratulations William Lisowski on reaching the milestone of 10,000 posts on Statalist! Your contri…
Mediation effects with MLM?I'm trying to do a somewhat tricky mediation test. Basically, I'm looking at the relationship betwee…
Need some help dealing with duplicatesHi all, I need some help with dealing with duplicates in my data. I have something like this: va…
Subscribe to:
Post Comments (Atom)
0 Response to Using a loop to append multiple waves of data
Post a Comment