My long dataset has between 1 and 3 observations on about 100,000 unique individuals. There is a unique identifier for each individual that I used as the i variable. The j variable has 35 values, but for any given individual there are no more than 3 of these values. Nevertheless, the long to wide command creates 35 new variables for each varying observation for each individual. Most of the new variables are blank for any given individual. The j variables are numeric dates.
How can I transform the data so that only the relevant new variables are in the dataset?
Thanks for any advice.
John
How can I transform the data so that only the relevant new variables are in the dataset?
Thanks for any advice.
John
Comment