View source: R/fmd_scaled_mixedtwANOVA.R
fmd_scaled_mixedtwANOVA | R Documentation |
This function calculates allometrically-scaled flow-mediated dilation responses for a mixed two-way ANOVA study design and returns pairwise comparisons between groups with a conservative Tukey post-hoc correction. The function will also return transformed means, standard errors, and 95% confidence intervals.
fmd_scaled_mixedtwANOVA(dat)
dat |
Data frame object; does not have to be named 'dat', but the columns that correspond to peak artery diameter, baseline artery diameter, group (or condition), and time must be labeled "dpeak", "dbase", "group", and "time", respectively. |
This function returns the following:
modelcoef |
A dataframe that contains the model coeficients from a linear mixed effects model |
tf.emmeans |
Backtransformed estimated marginal means |
maingroup |
Frequentist comparisons accross groups or conditions |
maintime |
Frequentist comparisons accross times or conditions. |
interactiongroup |
Linear and quadratic contrasts of group for each time. From the |
interactiontime |
Linear and quadratic contrasts of time for each group. From the |
all.comparisons |
Pairwise comparisons accross main effects and interactions. Treated with Tukey post-hot correction method and Kenward-Roger degrees of freedom method. Output from the |
plot |
Graphical representation using |
Simulated exercise intervention data consisting of an independent grouping (CON, MICT, SIT) x repeated measures at different times (0, 6 weeks):
dat <- data.frame(dbase = rnorm(300, 4.1, 1.2), dpeak = rnorm(300, 4.3, 1.1), group = as.factor(sort(rep(c("CON", "SIT", "MICT"), 100))), time = as.factor(rep(sort(rep(c("0wk", "6wk"), 50)), 3)), pid = as.factor(c(rep(1:50, 2), rep(51:100, 2), rep(101:150, 2))))
dat <- dat |>
dplyr::arrange(pid)
res <- fmd_scaled_mixedtwANOVA(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.