Dear R-helpers,
I am trying to plot a Bland-Altman-Plot using the BA.plot function from the
package MethComp. While there is a function to transform the values for
analysis as shown in the snippet below, I would like to have logarithmic axes
for display as well. The usual log = 'xy' does not work because of the
properties of the y-asxis (positive and negative values). I am sure that there
is a way but I haven't found it. Any suggestions?
Best regards an many thanks in advance
Thorsten
---- begin code snippet ----
example <- data.frame(meth = c('Marker 1', 'Marker 2',
'Marker 1', 'Marker 2',
'Marker 1', 'Marker 2', 'Marker 1', 'Marker 2',
'Marker 1', 'Marker 2',
'Marker 1', 'Marker 2', 'Marker 1', 'Marker 2',
'Marker 1', 'Marker 2',
'Marker 1', 'Marker 2', 'Marker 1', 'Marker 2'),
item = c('QC12_2_TP1',
'QC12_2_TP1', 'QC12_2_TP1', 'QC12_2_TP1',
'QC12_2_TP1', 'QC12_2_TP1',
'QC12_2_TP1', 'QC12_2_TP1', 'QC12_2_TP1',
'QC12_2_TP1', 'QC12_2_TP2',
'QC12_2_TP2', 'QC12_2_TP2', 'QC12_2_TP2',
'QC12_2_TP2', 'QC12_2_TP2',
'QC12_2_TP2', 'QC12_2_TP2', 'QC12_2_TP2',
'QC12_2_TP2'), repl = c('BER',
'BER', 'BRI', 'BRI', 'BRU', 'BRU',
'COP', 'COP', 'FRA', 'FRA', 'BER',
'BER',
'BRI', 'BRI', 'BRU', 'BRU', 'COP',
'COP', 'FRA', 'FRA'), y = c(7e-04, 9e-04,
4e-04, 4e-04, 8e-04, 7e-04, 5e-04, 7e-04, 5e-04, 6e-04, 0.0049, 0.0048,
0.0054, 0.0052, 0.00508, 0.00462, 0.0049, 0.0043, 0.0048, 0.0045))
example <- Meth(example)
BA.plot(example, col.points = rainbow(12), main = 'Bland-Altman
analysis',
Transform = 'log')
rm(example)
---- end code snippet ----
--
Thorsten Raff
2nd Medical Department,
University Hospital Schleswig-Holstein, Campus Kiel
Chemnitzstra?e 33
24116 Kiel
GERMANY
phone: +49 431 1697-5234
fax: +49 431 1697-1264
email: t.raff<at>med2.uni-kiel.de
web: www.uk-sh.de