trt: Perform test-retest analysis on a data set.

Description Usage Arguments Value Examples

View source: R/trt.R

Description

This conducts a test-retest analysis of a data set in long (tidy) format. This can be used with dplyr pipelines. However the variable names must be quoted.

Usage

1
trt(data, values, cases, rater = NULL)

Arguments

data

The total data frame

values

Column of the measured values (quoted character)

cases

Column of the individual values, i.e. individuals/measured items (character)

rater

Optional. Column of the rater/which measurement, i.e. measurement 1 and measurement, or raters 1, 2 and 3. If this is not specified, the function will assume that the values are in order by rater, or that it the order doesn't matter.

Value

List containing all the data, including a tibble called tidy, with the summary in a single row. icc is the ICC(A,1), and icc_l and icc_u are the upper and lower bounds of the 95% confidence interval for the icc. wcsv is the within-subject coefficient of variation, sdd is the smallest detectable difference (sddm is normalised to the mean), absvar is the average absolute variability. signvar is the signed variability (for detecting bias between measurements) and signvar_sd is the sd of the signed variability (for within-subjects power analyses), both as a fraction of the grand mean. All percentage values are not multiplied by 100.

Examples

1
2
3
4
5
6
7
library(tidyverse)
data("petVT", package = 'agRee')
amy <- as.data.frame(petVT$amygdala)
amy_l <- gather(amy) %>%
  mutate(indiv = rep(paste0('s', 1:11), times=2))

trt(amy_l, 'value', 'indiv', 'key')

mathesong/relfeas documentation built on March 4, 2020, 5:29 a.m.