You don't need a loop for that then, use the CMISS function to count missing records. Use DIM to get the dimension/number of variables.
array diagGrp(*) DIAG1-DIAG63;
non_missing = dim(diagGrp) - cmiss(of diagGrp(*));
@lberger wrote:
Hello Reeza,
I admire the work done here. I only need to create a column that contains the number of non missing values so I can get a mean of those counts. I will note this for future use. I ended up using a do loop as posted in the other responses.
Thank you,
Lon
... View more