data have;
input tract_or_block tract $4. tract_per_white tract_per_black tract_per_hisp ses;
cards;
100 100 0.67 0.1 0.2 1.8
1001 100 . . . 1.5
1002 100 . . . 1.4
200 200 0.2 0.2 0.2 1.1
2001 200 . . . 1.2
2002 200 . . . 1.3
;
run;
I'm trying fill the missing values with the non-missing values by TRACT without getting rid of any rows or columns. I've tried the following code but can't figure out how to keep all the variables and records.
proc means data=have noprint nway;
class TRACT
var tract_per:;
output out=want (drop= _TYPE_ _FREQ_) max= ;
run;