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
How to add value label to default missing values?Hi there, Sorry for a really beginner question. I am trying to add value labels to organise my data…
MimrgnsHi I'am trying to obtain margins after MI estimate and test differences between each slopes by a gro…
Using a cross sectional analysis to support the results of a panel analysisHi all, I have a 3 wave panel of children's height and weight and whether either of their parents e…
Paneldata with feDear Statalists, I'm using a panel dataset on U.S. imports to the EU including tariff changes for s…
Meta-Analyses-HeterogeneityHello, I ran a pairwise meta-analyses in STATA and i found high level of heterogeneity, so i want to…
Subscribe to:
Post Comments (Atom)
0 Response to Using a loop to append multiple waves of data
Post a Comment