measure_compare: Estimation of the amount of bias of the new measurement...

View source: R/measure_compare.R

measure_compareR Documentation

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

Description

measure_compare() implements the methodology reported in the paper: Taffé P. Effective plots to assess bias and precision in method comparison studies. Stat Methods Med Res 2018;27:1650-1660. Other relevant references: Taffé P, Peng M, Stagg V, Williamson T. Biasplot: A package to effective plots to assess bias and precision in method comparison studies. Stata J 2017;17:208-221. Taffé P, Peng M, Stagg V, Williamson T. MethodCompare: An R package to assess bias and precision in method comparison studies. Stat Methods Med Res 2019;28:2557-2565. Taffé P, Halfon P, Halfon M. A new statistical methodology to assess bias and precision overcomes the defects of the Bland & Altman method. J Clin Epidemiol 2020;124:1-7. Taffé P. Assessing bias, precision, and agreement in method comparison studies. Stat Methods Med Res 2020;29:778-796. Taffé P. When can the Bland-Altman limits of agreement method be used and when it should not be used. J Clin Epidemiol 2021; 137:176-181.

Usage

measure_compare(data, new = "y1", ref = "y2", id = "id", nb_simul = 1000)

Arguments

data

a required data frame containing the identification number of the subject (id), the measurement values from the new method (y1) and those from the reference method (y2).

new

an optional string. The column name containing the measurements of the new measurement method.

ref

an optional string. The column name containing the measurements of the reference method (at least two measurements per subject).

id

an optional string. The column name containing the subject identification numbers.

nb_simul

an optional number. The number of simulations used for simultaneous confidence bands.

Value

The function returns a list with the following items:

  • models: a list of models fitted in estimation procedure

  • sub: the original data frame with renamed columns and additional computed data

  • ref: a data frame for the reference method and its related estimates

  • y1_y2: a subset data frame of sub containing measurements for both methods, that is y1 and y2 columns are not NAs

  • new: a data frame for the new method and its related estimates

  • agg: a data frame made from ref and new containing a row per individual

  • sim_params: estimated model coefficients used afterward

  • nb_simul: the number of simulations used for confidence bands simulations

  • bias: differential and proportional biases for new method and the associated 95 percent confidence intervals

  • methods: a list of methods names provided by the user

Examples


### Load the data
data(data1)
### Analysis
measure_model <- measure_compare(data1, nb_simul=100)

MethodCompare documentation built on Sept. 11, 2024, 5:07 p.m.