estimate_bias: Calculate bias of a measurement

View source: R/08_estimate_bias.R

estimate_biasR Documentation

Calculate bias of a measurement

Description

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)


nutriverse/anthrocheckr documentation built on April 14, 2024, 8:38 p.m.