Learn R Programming

MethComp (version 1.30.0)

y2DA: 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

y2DA(A = 0, B = 1, S = NA)

Value

y2DA returns a 3-component vector with names c("DA-int","DA-slope","DA-sd"), referring to differences D=y1-y2 as a linear function of A=(y1+y2)/2.

Arguments

A

Intercept in the linear relation of y1 on y2.

B

Slope in the linear relation of y1 on y2.

S

SD for the linear relation of y1 on y2. Can be NA.

Author

Bendix Carstensen, Steno Diabetes Center, bendix.carstensen@regionh.dk, http://BendixCarstensen.com/MethComp

Details

#' y2DA takes intercept(A), slope(B) and sd(S) from the relationship y1=A+B y2 + E with sd(E)=E, and returns a vector of length 3 with names "int(t-f)","slope(t-f)","sd(t-f)", where t refers to "to" (y1 and f to "from" y2.

References

B. Carstensen: Comparing methods of measurement: Extending the LoA by regression. Stat Med, 29:401-410, 2010.

Examples

Run this code
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 ) ) )

Run the code above in your browser using DataLab