Hi! Below is what I have an what I'd like to have, basically I want my data to be balanced with missing values on the variables of interest, but the visit variable expanded. I have been playing around with proc expand, but can't quite work out how to get here as my ID variable (visit) is not a date. Thank you! Data have; input id visit sum; datalines; 1 1 20 1 2 22 1 3 22 2 1 19 2 2 21 2 3 23 2 4 19 3 1 18 ; run; data want; input id visit sum; datalines; 1 1 20 1 2 22 1 3 22 1 4 . 2 1 19 2 2 21 2 3 23 2 4 19 3 1 18 3 2 . 3 3 . 3 4 . ; run;
... View more