Skip to contents

Calculate the bias of a measurement against a gold standard. Two gold standards are used in this function: 1) measurements made by a supervisor or a known expert; and, 2) median of all measurements made by the observers.

Usage

estimate_bias(msur, msup, mall)

Arguments

msur

A numeric value or vector of mean measurements from observers

msup

A numeric value or vector of mean measurements from supervisor

mall

A numeric value or vector of the median of measurements from observers

Value

A numeric value or vector signifying bias

Examples

x <- subset(smartStdLong, measure_type == "height")

y <- calculate_mean(
  measures = x$measure_value, index = x$observer
)

z <- calculate_mean(x$measure_value)

estimate_bias(msur = y$Freq[x$Var1 != 0],
              msup = y$Freq[x$Var1 == 0],
              mall = z)
#> [1] bias_super bias_med  
#> <0 rows> (or 0-length row.names)