Hello,
I have data that takes the following form:
data have;
input month percent $;
cards;
1 .1
1 .3
1 NULL
1 NULL
1 NULL
2 .1
2 NULL
2 NULL
3 NULL
3 NULL
3 NULL
3 NULL
3 NULL
3 NULL
3 NULL
4 .1
4 .5
4 NULL
4 NULL
;
run;
I would like to fill in all of the data that is stored as NULL (char) with an equal-weighted percent that makes all of the percentages per month add to 1. So for the first month, all three NULL entries would become .2.
I know that I am going to have to turn the character variables into numeric variables, and I can change all of the NULL entries to zero without worry, because there are no entries that are 0 in the dataset, so I won't be losing data.
Is this something that I can use PROC STANDARD for? I have only used that for setting the mean and the SD before, but maybe this can work here too.
Thanks,
John