Skip to content
/ malp Public

R Package for maximum agreement linear predictor

Notifications You must be signed in to change notification settings

pchausse/malp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0b9db3e · Oct 8, 2024

History

70 Commits
Jun 29, 2023
Oct 8, 2024
Jun 21, 2023
May 16, 2023
Oct 8, 2024
Oct 8, 2024
Jun 27, 2023
Oct 8, 2024
Oct 8, 2024
Jun 27, 2023

Repository files navigation

R-CMD-check

Maximum Agreement Linear Predictor

The malp package implements the maximum linear prediction (MALP) developped by Kim et al. (2023). The MALP is defined as the linear predictor that maximizes the concordance correlation coefficient. Suppose we have a p × 1 vector of covariates x and a dependent variable Y . The MALP predictor is:

Y ~ ( x ) = ( 1 1 / γ ) μ Y + ( 1 / γ ) Y ~ ( x ) , ,

where γ is the concordance correlation coefficient (CCC), μ Y is the population mean of Y and
Y ~ ( x ) is the best linear predictor. For any predictor Y ~ , the CCC is defined as

γ = 2 σ Y Y ~ σ Y 2 + σ Y ~ 2 + ( μ Y μ Y ~ ) .

Let X = { 1 , x } and let the best linear predictor Y ~ ( x ) be X β β 1 + x β 2 , where β 1 = μ Y μ x β 2 and β 2 = V a r ( X ) 1 C o v ( X , Y ) , then the MALP can be written as:

Y ~ ( x ) = ( 1 1 / γ ) μ Y + ( 1 / γ ) [ X β ] = [ ( 1 1 / γ ) μ Y + β 1 / γ ] + x [ β 2 / γ ] α 1 + x α 2 X α

Assuming we have an IID sample Y i , x i of size n , a consistent estimator of the MALP at x = x 0 is:

Y ^ ( x 0 ) = α ^ 1 + x 0 α ^ 2 , ,

where α ^ 1 = ( 1 1 / γ ^ ) Y + β ^ 1 / γ ^ , α ^ 2 = β ^ 2 / γ ^ , β ^ 1 and β ^ 2 are the least square estimators, Y is the sample mean of Y and γ ^ is the square root of the least square coefficient of determination.

Example: Eye Data Set

In opthalmology, the central subfield macular thickness (CSMT) measurements can be obtained by optical coherence tomography (OCT). Abedi et al. (2011) focused on two types of OCT: time-domain Stratus OCT, the most widely used model prior to 2006; and spectral-domain Cirrus OCT, a more advanced model. As Cirrus OCT replaces Stratus OCT as a marker, the agreement between the measurements from two methods is of interest to researchers in the field. For this purpose, Abedi et al. (2011) provided a comparison between the two approaches and obtained a CCC-based conversion function from the Cirrus OCT to the Stratus OCT.

In the data set, both OCTs were measured from 46 subjects, i.e., 92 eyes, but only 61% of these observations were selected based on the reliability of the OCTs (signal strength ≥ 6 for both approaches). This subset of the original dataset is included in the package. To avoid the problem of correlation between observations, we only illustrate the method using right eye observations.

library(malp)
data(eye)
eye <- subset(eye, Eye=="OD")

We first compare the least squares the malp estimates:

fit <- lm(Stratus~Cirrus, eye)
mfit <- malp(Stratus~Cirrus, eye)
knitr::kable(summary(fit)$coef, caption="Least Squares")
Estimate Std. Error t value Pr(>|t|)
(Intercept) 63.5089313 21.7767222 2.916368 0.0069012
Cirrus 0.5090726 0.0843545 6.034919 0.0000017
knitr::kable(summary(mfit)$coef, caption="MALP")
Estimate Std. Error t value Pr(>|t|)
(Intercept) 20.473627 27.545111 0.7432763 0.4573144
Cirrus 0.677048 0.112611 6.0122742 0.0000000

The CCC for the LSLP is equal to 0.7223338, and it is equal to 0.7519003 for MALP. As expected, the CCC is higher for MALP since it maximizes it. We can compare the two fitted lines:

plot(Stratus~Cirrus, eye, xlab="Cirrus", ylab="Stratus",
     main="OD: MALP vs LSLP", xlim=c(125,325), ylim=c(100,300))
abline(mfit, lty=1, col="blue")
abline(mfit$lm, lty=2, col="red")
abline(1,1,lty=3)

References

Abedi, Gelareh, Payal Patal, Gheorghe Doros, and Manju L Subramanian. 2011. “Transitioning from Stratus OCT to Cirrus OCT: A Comparison and a Proposed Equation to Convert Central Subfield Macular Thickness Measurements in Healthy Subjects.” Graefe’s Archive for Clinical and Experimental Ophthalmology 249 (9): 1353–7.

Kim, Taeho, George Luta, Matteo Bottai, Pierre Chausse, Gheorghe Doros, and Edsel A. Pena. 2023. “Maximum Agreement Linear Prediction via the Concordance Correlation Coefficient.” https://arxiv.org/abs/2304.04221.

About

R Package for maximum agreement linear predictor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published