knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

anthrocheckr: An Implementation of Anthropometric Measurement Standardisation Tests

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Lifecycle: maturing R-CMD-check R build status Codecov test coverage CodeFactor DOI

Ensuring the precision and accuracy of measurements is critical when collecting anthropometric data. Anthropometrists are usually tested for precision and accuracy of measurement through standardisation tests performed prior to anthropometric data collection. This package provides functions to calculate inter- and intra-observer technical error of measurement (TEM) to assess precision of measurements.

What does the package do?

{anthrocheckr} provides functions for:

  1. Calculating standard summaries for intra-observer or inter-observer measurements;

  2. Calculating intra-observer or inter-observer technical error of measurement (TEM) for multiple subjects and for multiple measurers/observers;

  3. Calculating multiple measurers/observers relative technical error of measurement (relative TEM);

  4. Calculating intra-observer total technical error of measurement (total TEM);

  5. Calculating coefficient of reliability; and,

  6. Calculating bias in measurements/observation against a gold standard.

Installation

{anthrocheckr} is not yet on CRAN but can be installed from the nutriverse R Universe as follows:

install.packages(
  "anthrocheckr",
  repos = c('https://nutriverse.r-universe.dev', 'https://cloud.r-project.org')
)

Usage

Calculate intra-observer and/or inter-observer summaries

The mean, standard deviation, and maximum difference in measurements are the requisite summary measures for various anthropometric measurement standardisations tests. These can be calculated as follows:

## Intra-observer mean for weight ----
weight_df <- subset(smartStdLong, subset = measure_type == "weight")

calculate_mean(weight_df$measure_value, index = weight_df$observer)
## Intra-observer sd for weight ----
calculate_sd(weight_df$measure_value, index = weight_df$observer)
## Intra-observer max difference for weight ----
weight_df_wide <- tidyr::pivot_wider(
  weight_df, 
  names_from = c(measure_type, measure_round), 
  values_from = measure_value, names_sep = "_"
)

calculate_max(
  abs(weight_df_wide$weight_1 - weight_df_wide$weight_2), 
  index = weight_df_wide$observer
)

Calculate intra-observer and inter-observer technical error of measurement (TEM)

## Inter-observer max difference for weight ----
weight_df_wide <- tidyr::pivot_wider(
  weight_df, 
  names_from = c(measure_type, measure_round), 
  values_from = measure_value, names_sep = "_"
)

inter_tem <- calculate_tem(
  abs(weight_df_wide$weight_1 - weight_df_wide$weight_2), 
  n = nrow(weight_df_wide)
)

which gives

calculate_tem(
  abs(weight_df_wide$weight_1 - weight_df_wide$weight_2), 
  n = nrow(weight_df_wide)
)
## Intra-observer max difference for weight ----
weight_df_wide <- tidyr::pivot_wider(
  weight_df, 
  names_from = c(measure_type, measure_round), 
  values_from = measure_value, names_sep = "_"
)

intra_tem <- calculate_tem_cohort(
  df = weight_df_wide, m1 = "weight_1", m2 = "weight_2",
  index = "observer", n = nrow(weight_df_wide)
)

which gives

calculate_tem_cohort(
  df = weight_df_wide, m1 = "weight_1", m2 = "weight_2",
  index = "observer", n = nrow(weight_df_wide)
)

Calculating relative technical error of measurement

mean_weight <- calculate_mean(
  weight_df$measure_value, index = weight_df$observer
)

calculate_relative_tem(intra_tem$tem, mean_weight$mean)

Citation

If you use the {anthrocheckr} package in your work, please cite using the suggested citation provided by a call to the citation() function as follows:

citation("anthrocheckr")

Community guidelines

Feedback, bug reports and feature requests are welcome; file issues or seek support here. If you would like to contribute to the package, please see our contributing guidelines.

Please note that the {anthrocheckr} project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



nutriverse/anthrocheckr documentation built on Dec. 23, 2024, 2:22 a.m.