Skip to content

predict_with_observations_plot

Description

Plots predictions of the model with observed values

Usage

predict_with_observations_plot(
data,
fit,
conc_col,
dv_col,
treatment_predictors,
control_predictors = NULL,
reference_threshold = c(
10
),
conf_int = 0.9,
xlabel = "Concentration (
ng/mL
)",
ylabel = bquote(
Delta ~ "QTc (
ms
)"
),
title = ""
)

Arguments

NameDescription
dataa dataframe of QTc dataset
fitthe lme model to make predictions with
conc_colan unquoted column name of drug concentration measurements
dv_colan unquoted column name of dQTC measurements
treatment_predictorsa list for predictions with model. Should contain a value for each predictor in the model.
control_predictorsan optional list for contrast predictions
reference_thresholdoptional vector of numbers to add as horizontal dashed lines
conf_inta float for the fractional confidence interval. default = 0.9
xlabela string for xlabel
ylabela string for ylabel
titlea string of the plot title

Returns

a plot

Examples

data <- preprocess(data)
fit <- fit_prespecified_model(
data,
deltaQTCF,
ID,
CONC,
deltaQTCFBL,
TRTG,
TAFD,
"REML",
TRUE
)
predict_with_observations_plot(
data,
fit,
CONC,
deltaQTCF,
list(
CONC = 0,
TRTG = "Verapamil HCL",
TAFD = "2 HR",
deltaQTCFBL = 0
),
conf_int = 0.9
)