Learn R Programming

MethodCompare

The goal of MethodCompare is to implement the methodology reported in the two papers : “Effective plots to assess bias and precision in method comparison studies” (P. Taffé) published in Statistical Methods in Medical Research (2018; 27:1650-1660), “Assessing bias, precision, and agreement in method comparison studies” (P. Taffé) published in Statistical Methods in Medical Research (2020; 29:778-796). The package will generate graphs (the bias, total bias, precision, comparison, agreement without and after recalibration, percentage of agreement without and after recalibration, mean squared error and square root mean squared error plots), compute the differential and proportional biases with their respective 95% CIs.

Installation

You can install the development version of MethodCompare from GitHub with:

# install.packages("devtools")
devtools::install_github("UBERLULU/MethodCompare")

Example

This is a basic example which shows you how to solve a common problem:

library(MethodCompare)
## basic example code
### Load the data
data(data1)
### Analysis
measure_model <- measure_compare(data1)
#> [1] "Computing differential and proportional biases"
#> [1] "id variable: id"
#> [1] "New method y variable: y1"
#> [1] "Reference method y variable: y2"
#> [1] "Number of simulations set to 1000"
### Display bias plot
bias_plot(measure_model)
#> [1] "Generating Bias Plot ..."

Copy Link

Version

Install

install.packages('MethodCompare')

Monthly Downloads

240

Version

1.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Thomas Blomet

Last Published

February 9th, 2025

Functions in MethodCompare (1.1.0)

pct_agreement1

Plot the percentage agreement after recalibration
mse

Plot the mean squared errors
measure_compare

Estimation of the amount of bias of the new measurement method relative to the reference method
agreement0

Plot the agreement before recalibration
MethodCompare-package

Evaluating Bias and Precision in Method Comparison Studies
bias_plot

Plot the bias and measurements
agreement1

Plot the agreement after recalibration
compare_plot

Plot used to visualize the recalibration of the new method after estimating the bias
precision_plot

Plot the precision of the methods
sqrt_mse

Plot the square root of the mean squared errors
total_bias_plot

Plot total bias
pct_agreement0

Plot the percentage agreement before recalibration
data3

Simulated dataset 3
data2

Simulated dataset 2
data1

Simulated dataset 1