fmd_scaled_rmowANOVA: Allometric scaling for flow-mediated dilation: Repeated...

View source: R/fmd_scaled_rmowANOVA.R

fmd_scaled_rmowANOVAR Documentation

Allometric scaling for flow-mediated dilation: Repeated measures one-way ANOVA

Description

This function calculates allometrically-scaled flow-mediated dilation responses for repeated measures one-way ANOVA study designs, and returns comparisons between groups. The function will also return back-transformed means, standard errors, and 95% confidence intervals. Users must label the data set columns as "dpeak", "dbase", and "group" respectively. This Rtery function also requires that data be arranged in long format.

Usage

fmd_scaled_rmowANOVA(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 labelled "dpeak", "dbase", and "group", respectively.

Value

This function returns the following:

model.coef

A dataframe continaing coefficients from the linear model

main.effects

A dataframe containing main effects and statistical contrasts

transformed.emmeans

Backtransformed estimated marginal means and model standard error

plot

Graphical representation using ggplot2 syntax; contains means and 95% confidence intervals

Examples

Create a sample data frame (simulated data; as such, values may not correspond with physiological norms) with peak and baseline artery diameters from sample participants:

dat <- data.frame(pid = as.factor(rep(1:10, 3)), dpeak = rnorm(30, 4.27, 1.12), dbase = rnorm(30, 4.16, 1.21)*0.8, group = as.factor(c(rep("NS", 10), rep("SD", 10), rep("SR", 10))))
dat <- dat |>
dplyr::arrange(pid)
res <- fmd_scaled_rmowANOVA(dat)


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