61 children had their blood oxygen content measured at the Children's
Hospital in Melbourne, either with a chemical method analysing gases in the
blood (CO) or by a pulse oximeter measuring transcutaneously
(pulse). Replicates are linked between methods; i.e. replicate 1 for
each of the two methods are done at the same time. However, replicate
measurements were taken in quick succession so the pairs of measurements are
exchangeable within person.
A data frame with 354 observations on the following 4 variables.
methMeasurement methods, factor with levels
CO, pulse
itemId for the child
replReplicate of measurements. There were 3 measurements for most children, 4 had only 2 replicates with each method, one only 1
yOxygen saturation in percent.
data(ox)
str(ox)
#> 'data.frame': 354 obs. of 4 variables:
#> $ meth: Factor w/ 2 levels "CO","pulse": 1 1 1 1 1 1 1 1 1 1 ...
#> $ item: num 1 1 1 2 2 2 3 3 3 4 ...
#> $ repl: num 1 2 3 1 2 3 1 2 3 1 ...
#> $ y : num 78 76.4 77.2 68.7 67.6 68.3 82.9 80.1 80.7 62.3 ...
ox <- Meth(ox)
#> The following variables from the dataframe
#> "ox" are used as the Meth variables:
#> meth: meth
#> item: item
#> repl: repl
#> y: y
#> #Replicates
#> Method 1 2 3 #Items #Obs: 354 Values: min med max
#> CO 1 4 56 61 177 22.2 78.6 93.5
#> pulse 1 4 56 61 177 24.0 75.0 94.0
with( ox, table(table(item)) )
#>
#> 2 4 6
#> 1 4 56
summary( ox )
#> #Replicates
#> Method 1 2 3 #Items #Obs: 354 Values: min med max
#> CO 1 4 56 61 177 22.2 78.6 93.5
#> pulse 1 4 56 61 177 24.0 75.0 94.0
# The effect of basing LoA on means over replicates:
par( mfrow=c(1,2), mar=c(4,4,1,4) )
BA.plot( ox , diflim=c(-20,20), axlim=c(20,100), repl.conn=TRUE )
#> Error in solve.default(do.call("cbind", Xcols), apply(shifted, 2, fun, ...)): Lapack routine dgesv: system is exactly singular: U[9,9] = 0
# BA.plot( mean(ox), diflim=c(-20,20), axlim=c(20,100) )