Calculate relative TEM of measurements by multiple observers.

calculate_relative_tem(tem, mean_value)

Arguments

tem

A numeric vector or data frame of technical error of measurements produced from applying calculate_tem_cohort().

mean_value

A numeric vector or data frame of mean of measurements produced from applying summary_measure().

Value

A vector or data frame of calculated relative TEM per observer and per measurement type.

Examples

# Calculate relative TEM for weight using the smartStd dataset tem <- calculate_tem_cohort(m1 = smartStd$muac1, m2 = smartStd$muac2, index = smartStd$observer, n = 10) mean_value <- summary_measure(x = c(smartStd$weight1, smartStd$weight2), index = rep(smartStd$observer, 2))$mean rel_tem <- calculate_relative_tem(tem = tem, mean_value = mean_value) rel_tem
#> 0 1 2 3 4 5 6 7 #> 25.21044 16.85629 19.36521 203.23668 25.26115 62.59346 20.53462 52.11039 #> 8 9 10 #> 22.06584 15.78844 13.93879
# Calculate relative TEM using smartStdLong dataset tem <- calculate_tem_cohort(m1 = smartStdLong$measure_value[smartStdLong$measure_round == 1], m2 = smartStdLong$measure_value[smartStdLong$measure_round == 2], index = smartStdLong[smartStdLong$measure_round == 1, c("observer", "measure_type")], n = 10) mean_value <- summary_measure(x = smartStdLong$measure_value, index = smartStdLong[ , c("observer", "measure_type")])$mean rel_tem <- calculate_relative_tem(tem = tem, mean_value = mean_value) rel_tem
#> height muac weight #> 0 0.5759464 2.248002 0.5501370 #> 1 26.8084573 1.531521 2.3430872 #> 2 11.5213943 1.807999 0.8126483 #> 3 0.3076291 19.323057 0.4337829 #> 4 0.7191498 2.300710 1.1606699 #> 5 0.5622252 5.504141 9.7163749 #> 6 0.2679982 1.902195 0.9408907 #> 7 0.3420280 4.809307 0.6987351 #> 8 0.5748732 2.023566 0.7782767 #> 9 0.3749134 1.486986 0.7477441 #> 10 0.3415973 1.281633 2.0123765