fmd_scaled_owANOVA: Allometric scaling for flow-mediated dilation: One-way ANOVA

View source: R/fmd_scaled_owANOVA.R

fmd_scaled_owANOVAR Documentation

Allometric scaling for flow-mediated dilation: One-way ANOVA

Description

This function calculates allometrically-scaled flow-mediated dilation responses for one-way ANOVA study designs and returns the corresponding 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 users arrange data in long format.

Usage

fmd_scaled_owANOVA(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", 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

Simulated data with peak and baseline artery diameters from 12 participants:

EXAMPLE 1: Allometric scaling not required
dat <- data.frame(participant = c("P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8", "P9", "P10", "P11", "P12"), dpeak = c(4.1, 3.2, 6.5, 5.9, 4.3, 2.1, 4.0, 6.3, 3.3, 4.9, 5.2, 7.1), dbase = c(4.0, 2.9, 6.0, 5.7, 4.1, 2.0, 3.7, 6.2, 3.2, 4.3, 5.1, 6.9), group = as.factor(c("NS", "NS", "NS", "NS", "SD", "SD", "SD", "SD", "SR", "SR", "SR", "SR")))
fmd_scaled_owANOVA(dat)

EXAMPLE 2: Allometric scaling required and calculated:
dat <- data.frame(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))))
fmd_scaled_owANOVA(dat)


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