An open API service indexing awesome lists of open source software.

https://github.com/nutriverse/anthrocheckr

An Implementation of Anthropometric Measurement Standardisation Tests
https://github.com/nutriverse/anthrocheckr

anthropometry standardisation

Last synced: 6 months ago
JSON representation

An Implementation of Anthropometric Measurement Standardisation Tests

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r setup, include = FALSE}
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.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![R-CMD-check](https://github.com/nutriverse/anthrocheckr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/nutriverse/anthrocheckr/actions/workflows/R-CMD-check.yaml)
[![R build status](https://github.com/nutriverse/anthrocheckr/workflows/test-coverage/badge.svg)](https://github.com/nutriverse/anthrocheckr/actions)
[![Codecov test coverage](https://codecov.io/gh/nutriverse/anthrocheckr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/nutriverse/anthrocheckr?branch=main)
[![CodeFactor](https://www.codefactor.io/repository/github/nutriverse/anthrocheckr/badge)](https://www.codefactor.io/repository/github/nutriverse/anthrocheckr)
[![DOI](https://zenodo.org/badge/162917178.svg)](https://zenodo.org/badge/latestdoi/162917178)

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](https://cran.r-project.org) but can be installed from the [nutriverse R Universe](https://nutriverse.r-universe.dev) as follows:

```{r install-r-universe, eval = FALSE}
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:

```{r mean-summary}
## Intra-observer mean for weight ----
weight_df <- subset(smartStdLong, subset = measure_type == "weight")

calculate_mean(weight_df$measure_value, index = weight_df$observer)
```

```{r sd-summary}
## Intra-observer sd for weight ----
calculate_sd(weight_df$measure_value, index = weight_df$observer)
```

```{r max-diff-summary}
## 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)

```{r calculate-inter-tem, eval = FALSE}
## 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

```{r calculate-inter-tem-show, echo = FALSE}
calculate_tem(
abs(weight_df_wide$weight_1 - weight_df_wide$weight_2),
n = nrow(weight_df_wide)
)
```

```{r calculate-intra-tem, eval = FALSE}
## 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

```{r calculate-intra-tem-show, echo = FALSE}
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

```{r calculate-relative-tem}
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:

```{r citation}
citation("anthrocheckr")
```

## Community guidelines

Feedback, bug reports and feature requests are welcome; file issues or seek support [here](https://github.com/nutriverse/anthrocheckr/issues). If you would like to contribute to the package, please see our [contributing guidelines](https://nutriverse.io/anthrocheckr/CONTRIBUTING.html).

Please note that the `{anthrocheckr}` project is released with a [Contributor Code of Conduct](https://nutriverse.io/anthrocheckr/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.