[R] help with Tukey Mean-Difference Plot

Frank Mattes f.mattes at ucl.ac.uk
Fri Aug 15 23:15:36 CEST 2003


Dear R users,

I would appreciate for some advise how to generate a Tukey 
Mean-Difference Plot with the tmd function part of the lattice 
library. I have two test results (log transformed) which showing a 
correlation on a scatterplot. However the correlation line is 
parallel displaced depending on a clinical condition. I thought to a 
Tukey Mean Difference Plot would show me the difference betweenthe 
two values.
I don't have the literature how the plot gets constructed, but my understanding
from 
http://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/meandiff.htm 
is that the first from each distribution a qq plot is constructed and 
than the coardiantes of the qq-plot are transformed according the 
formula x=x+y/2 and y=x+y.

I tried this with

tmd(xyplot(a ~ b| c, data=data)) with

a and b holding my log10 transformed numerical values, and c the condition.

However I think I don't get a Tukey Mean-Difference plot. It looks to 
me that only
  x=x+y/2 and y=x+y. transformation is performed (a=a+b; b=b+a/2).
and the result is displayed as lattice graphic.

It would be great if anyone could help me to find the error in my plot.

May thanks

Frank

-- 
Frank Mattes				e-mail:	f.mattes at ucl.ac.uk
Department of Virology			fax	0044(0)207 8302854
Royal Free Hospital and 			tel	0044(0)207 8302997
University College Medical School
London




More information about the R-help mailing list