Given Dataset:
data hello;
input id value;
cards;
101 22
101 44
103 22
104 22
104 55
106 22
106 .
;
run;
I am trying to create a nvariable and Dtype by Id variable as follows:
Id value Nvalue Dtype
101 22
101 44
33 Average
103 22
104 22
104 55
38.5 Average
106 22
106 .
22 LOCF
Is there any possible way to get the output as mentioned above.