I have a parent SET1.REC, containing a key unique identifier ID and AGE and SEX, related to child SET2.REC, containing VAR1 and VAR2
In analysis, I create SET12.REC that has now as many records as SET2 (ID, AGE, and SEX) repeated for each record up to as many times as there are values for VAR1 and VAR2. If SET1 actually represents the individuals identified by ID, and SET2, e.g., visits for ID, and I wish now to make a NEW.REC containing only as many records as there are IDs, but making new variables VAR11, VAR21, VAR12, VAR22, and VAR13, VAR23, VAR14, VAR24 (if there are up to 4 visits for each ID, HOW would one thus write an EpiData Analysis command set to get from:
SET12.REC ID AGE SEX VAR1 VAR2
NEWSET.REC ID AGE SEX VAR11 VAR21 VAR12 VAR22 VAR13 VAR23 VAR14 VAR24
(where I know there is a maximum of 4 visits per ID)
with only ID number of records?
Thank you for any input you might have,