Skip to content

eda_scatter_with_regressions

Description

plots scatter plot with with linear and loess regressions. Can be used to check for linearity.

Usage

eda_scatter_with_regressions(
data,
ydata_col,
xdata_col,
trt_col = NULL,
reference_threshold = NULL,
loess_line = TRUE,
linear_line = TRUE,
span = 0.99,
conf_int = 0.9,
style = list(
)
)

Arguments

NameDescription
dataa dataframe of QT dataset
ydata_colan unquoted column name of dependent variable measurements
xdata_colan unquoted column name of independent variable measurements
trt_colOptional - an unquoted column name of treatment group
reference_thresholdoptional vector of numbers to add as horizontal dashed lines
loess_linea bool to add LOESS regression line
linear_linea bool to add a linear regression line
spana fractional value for LOESS span parameter in geom_smooth if LOESS is used, default 0.99
conf_inta fractional numeric for setting confidence interval, default = 9
stylea named list of any argument that can be passed to style_plot. Shapes are mapped to treatment groups and can be controlled via the shapes parameter in style

Returns

a plot

Examples

data <- preprocess(data)
eda_scatter_with_regressions(
data,
deltaQTCF,
CONC,
TRTG,
reference_threshold = 10)