fmd_scaled_rmtwANOVA: Allometric scaling for flow-mediated dilation: Two-way...

View source: R/fmd_scaled_rmtwANOVA_function.R

fmd_scaled_rmtwANOVAR Documentation

Allometric scaling for flow-mediated dilation: Two-way repeated measure ANOVA

Description

This function calculates allometrically-scaled flow-mediated dilation responses for two-way repeated measure ANOVA study designs and returns pairwise comparisons between groups with a Tukey post-hoc correction. The function will also return backtransformed means, standard errors, and 95% confidence intervals.

Usage

fmd_scaled_rmtwANOVA(dat)

Arguments

dat

data frame object; does not have to be named 'dat', but the columns that correspond to peak artery diameter, baseline artery diameter, and group (or condition) must be labeled "dpeak", "dbase", and "group", and "time", respectively.

Examples

Simulated data comparing FMD before and after normal sleep (NS), sleep deprivation (SD), and sleep restriction (SR), among 50 participants:
dat <- data.frame(dbase = rnorm(300, 4.1, 1.2), dpeak = rnorm(300, 4.3, 1.1), group = as.factor(rep(c("NS", "SR", "SD"), 100)), time = as.factor(rep(sort(rep(c("pre", "post"), 50)), 3)), pid = c(rep(1:50, 6)))

dat <- dat |>
dplyr::arrange(pid)

res <- fmd_scaled_rmtwANOVA(dat)


jcherubini/Rtery documentation built on April 17, 2025, 3:07 p.m.