ba_analysis: Perform Bland-Altman analysis on a data frame

View source: R/ba_analysis.R

ba_analysisR Documentation

Perform Bland-Altman analysis on a data frame

Description

Perform Bland-Altman analysis on a data frame

Usage

ba_analysis(df, x_var, y_var, regress_against = c("Y", "XY_mean"), ...)

Arguments

df

the data frame on which to operate

x_var

character. The column name of the X variable

y_var

character. The column name of the Y variable (criterion measure, if applicable)

regress_against

character. One of "Y" (to regress bias against yvar) or "XY_mean" (to regress bias against rowMeans(x_var, y_var)).

...

optional arguments passed to data.frame, e.g. to give the output results a label

Value

A data frame that has various summaries (means, standard deviations, and missing data details) plus mean bias (mean_bias column) and limits of agreement (lower_LOA and upper_LOA columns)

Examples

data(ex_data, package = "PAutilities")
ba_analysis(ex_data, "Axis1", "Vector.Magnitude", "XY_mean")
ba_analysis(
  ex_data, "Axis1", "Vector.Magnitude", "XY_mean",
  an_arbitrary_added_column = "Example of passing an extra column"
)

PAutilities documentation built on Aug. 21, 2022, 9:05 a.m.