View source: R/fmd_scaled_rmtwANOVA_function.R
fmd_scaled_rmtwANOVA | R Documentation |
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.
fmd_scaled_rmtwANOVA(dat)
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. |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.