DA2y {MethComp} | R Documentation |
Convert DA to (classical) regression
Description
The functions DA2y
and y2DA
are convenience functions that
convert the estimates of intercept, slope and sd from the regression of
D=y_1-y_2
on A=(y_1+y_2)/2
, back and forth
to the resulting intercept, slope and sd in the relationship between
y_1
and y_2
, cf. Carstensen (2010), equation 6.
Usage
DA2y(a = 0, b = 0, s = NA)
Arguments
a |
Intercept in the linear relation of the differences |
b |
Slope in the linear relstion of the differences to the averages. |
s |
SD from the regression of the differences in the averages. Can be
|
Details
DA2y
takes the intercept(a
), slope(b
) and sd(s
) from
the relationship (y1-y2)=a+b((y1+y2)/2)+e
with sd(e
)=s
,
and returns a two by 3 matrix with columns "int","slope","sd"
and
rows "y1|2","y2|1"
.
Value
DA2y
returns a 2 by 3 matrix with rownames c("y1|2","y2|1")
and columnnames c("int","slope","sd")
, calculated under the
assumption that the differences were formed as D <- y1 - y2
.
Author(s)
Bendix Carstensen, Steno Diabetes Center, bendix.carstensen@regionh.dk, http://BendixCarstensen.com/MethComp
References
B. Carstensen: Comparing methods of measurement: Extending the LoA by regression. Stat Med, 29:401-410, 2010.
Examples
data( milk )
DA.reg( milk )
data( sbp )
print( DA.reg(sbp), digits=3 )
# Slope, intercept : y1 = 0.7 + 1.2*y2 (0.4)
A <- c(0.7,1.2,0.4)
( y2DA( A ) )
( DA2y( y2DA( A ) ) )