I ran into little trouble transforming a set of data I need for analysis. I have been trying to analyze results of a lab test as Z-scores. I have an output field with a reading and unit field. Data are shown in the figure below.
The approach I followed was to convert this data to Z-scores by taking every individual subset of data for a unit. So one subset for the unit "IU/L", its SD, mean and subsequently its Z-scores were calculated. The same procedure was repeated for "g/L", "mmol/L", and the like. The calculated Z-scores were then mapped back to the original readings.
Is this approach correct? And are there any work-arounds to reduce the effort this procedure consumes?