The code creator is great, thanks for introducing this.
I'm struggling to resolve an issue that has arisen from a section of code created. In a 'long' dataset, cases in wave 'a' are being duplicated in the dataset. That is, 'pidp' and 'wavename' do not uniquely identify cases, and inspection reveals a duplication of all records from wave 'a' (coded 1). I don't fully understand the loop syntax to find where the problem may be.
Any help would be appreciated.
The code creator reference is: 3b620ca633234d53b8afc87bada06fce (also file attached)