calculate_tem_cohort: Calculate intra-observer TEM for each observer

View source: R/03_calculate_tem_cohort.R

calculate_tem_cohortR Documentation

Calculate intra-observer TEM for each observer

Description

Function to calculate *intra-observer TEM* for each observer using input dataset containing multiple types of multiple measurements from multiple observers.

Usage

calculate_tem_cohort(df, m1, m2, index = NULL, n)

Arguments

df

A data.frame containing data on multiple measurements made by multiple observers on multiple subjects

m1

A character value for variable in 'df' containing initial round measurements made by multiple observers

m2

A character value for variable in 'df' containing subsequent round measurements made by multiple observers

index

A character value or vector specifying the variable name/s in 'df' containing the factors to be used to group the results into. If multiple observers, at least two variable names should be provided as observer identifiers. Any other variable in 'df' that should be used as grouping factor should be included. This is *optional* and is set to NULL by default. This would indicate that the summary metrics will be made for the values in 'measures' without any grouping

n

Number of subjects measured

Value

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

Examples

# Get the TEM per observer for MUAC measurements in the smartStd dataset
calculate_tem_cohort(df = smartStd,
                     m1 = "muac1", m2 = "muac2",
                     index = "observer", n = 10)


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