Hi,
I am trying to programme several simple imputation techniques (namely
unconditional and conditional mean imputation, Healy-Westmacott procedure,
Buck's 1960 method as well as regression based methdos) as well as using SAS to
do EM and DA. My problem is that I want to read in a completely observed data
set and then randomly remove values, and then use the dataset created for
analyses. The way I am thinking of programming requires my data set to be in an
array format so that I can work with the entire thing, individual values or
columns by specifying things like data, data[1,2] and data[1,*]. I amn having
problems getting SAS (see code below) to create arrays - any help on this
problem, possible SAS codes or places to look on the web for help would all be
appreciated.
Many thanks
Fay Hughes
Statistics masters student
University of Natal, Durban
SAS code (randomly removes values, but does not put the remaining ones into an
array)
data try;
input Oxygen RunTime RunPulse @@;
array try2(3,1) Oxygen RunTime RunPulse;
DO cols = 1 to 3;
DO rows = 1 to 1;
x=rand('uniform');
if (x<0.1) then try2(cols,rows)= 0;
end;
end;
datalines;
44.609 11.37 178
39.442 13.08 174
45.313 10.07 185
60.055 8.63 170
51.855 10.33 166
49.156 8.95 180
39.407 12.63 174
46.080 11.17 156
45.790 10.47 186
50.545 9.93 148
48.673 9.40 186
47.920 11.50 170
47.467 10.50 170
;