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
endogeneity test in PPMLHDFEHi Tom Zylkin Joao Santos Silva, I am looking for the impact of non-tariff measures on Peruvian exp…
Multiple imputation with weighted dataI've calculated Prevalence Ratios (IRR through Poisson with robust error variance) on Stata 14.2 for…
margins after an unconditional melogit modelI'm trying to understand what the margins command does after an unconditional melogit model. Specifi…
Connecting Stata to Snowflake ODBCHello all. I'm looking for some assistance or guidance in setting up a Snowflake ODBC connection for…
Independent variable is not significant when run alone, however when I include it in an index it is significant. How should I proceed?I am writing a research project on the impact of freedom in countries on the handling of COVID-19, w…
Subscribe to:
Post Comments (Atom)
0 Response to Using a loop to append multiple waves of data
Post a Comment