Skip to content

gof_vpc_plot

Description

Performs a visual predictive check and plots the results

Usage

gof_vpc_plot(
data,
fit,
xdata_col,
dv_col,
conf_int = 0.9,
nruns = 500,
nbins = 10,
type = 2,
xlabel = "Concentration (
ng/mL
)",
ylabel = bquote(
Delta ~ "QTc (
ms
)"
),
title = ""
)

Arguments

NameDescription
dataa dataframe containing the QTc data
fitthe model fit object
xdata_colan unquoted column name for independent variable
dv_colan unquoted column name for dependent variable
conf_inta fractional numeric for confidence interval (quantiles of 5/95th quantiles), default = 0.9
nrunsinteger number of simulations to run
nbinsinteger number of bins to break independent variable into - OR - a user specified vector for non-uniform binning
typeinteger for type parameter of stats::quantile
xlabela string for x label of plot, default is ‘Concentration (ng/mL)‘
ylabela string for y label of plot, default is bquote(Delta ~ ‘QTc (ms)‘)
titlea string for plot title

Returns

a plot of the VPC results

Examples

data <- preprocess(data)
fit <- fit_prespecified_model(
data,
deltaQTCF,
ID,
CONC,
deltaQTCFBL,
TRTG,
TAFD,
"REML",
TRUE
)
gof_vpc_plot(data, fit, CONC, deltaQTCF, nruns = 2)