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.

Data Set

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?

  • $\begingroup$ You did not provide the ultimate goal of the analysis nor any motivation for the need for $z$-scores. $\endgroup$ – Frank Harrell Jan 4 '14 at 13:12
  • $\begingroup$ The intent here is to be able to compare the "Results" data from a bunch of sources. It also gets utilized in PCA and repeat-value detection, amongst a few other preliminary tests. $\endgroup$ – myriadcolours Jan 4 '14 at 13:46
  • $\begingroup$ I don't see how $z$-scores are relevant for that. If the standard deviations differ you are then comparing different absolute effects, for one thing. $\endgroup$ – Frank Harrell Jan 5 '14 at 3:34
  • $\begingroup$ @FrankHarrell: The knowledge that Z-scores allow me to bring readings with different units on the same scale, was the motivation. I have also used the values to perform an outlier analysis (as a part of preliminary tests) for which I would need to have all my readings on a common scale. Hence the aforementioned approach. $\endgroup$ – myriadcolours Jan 5 '14 at 4:40
  • $\begingroup$ By using $z$-scores with different standard deviations in different samples you are actually doing the analysis on different scales. In addition, you are assuming the variables are Gaussian and that "badness" is equidistant from the mean. $\endgroup$ – Frank Harrell Jan 5 '14 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.