Learn R Programming

tci (version 0.1.2)

plot.pkmod: Plot object with class 'pkmod'

Description

Will show predicted concentrations in compartments associated with an infusion schedule.

User can provide a series of effect-site concentrations and a PD model or an infusion schedule with a PK-PD model.

Plot output returned by "bayes_control" function.

Usage

# S3 method for pkmod
plot(
  x,
  ...,
  inf,
  npts = 1000,
  title = NULL,
  xlab = "Time",
  ylab = "Concentration"
)

# S3 method for pdmod plot( x, ..., pkmod, inf, pars_pd, pars_pk = NULL, npts = 1000, plot_pk = TRUE, title = NULL, ecmpt = NULL, xlab = "Time", ylab_con = "Concentration", ylab_resp = "Response" )

# S3 method for tciinf plot( x, ..., title = NULL, display = TRUE, xlab = "Time", ylab_con = "Concentration", ylab_resp = "Response" )

# S3 method for datasim plot( x, ..., pars_prior = NULL, pars_post = NULL, pk_ix = NULL, pd_ix = NULL, xlab = "Time", ylab_con = "Concentration", ylab_resp = "Response" )

# S3 method for bayessim plot(x, ..., xlab = "Time", ylab_con = "Concentration", ylab_resp = "Response")

Value

ggplot object displaying predicted concentrations for a pkmod object.

ggplot object arranged with gridExtra::grid.arrange displaying predicted response for a pdmod object.

gtable object using gridExtra::arrangeGrob

ggplot object displaying simulated data

ggplot object displaying simulated data.

Arguments

x

Object returned from "bayes_control" function

...

...

inf

An infusion schedule object with columns "begin","end","infrt".

npts

Number of points used to evaluate predicted concentrations.

title

Title of plot.

xlab

x-axis label

ylab

y-axis label

pkmod

PK model

pars_pd

Parameters used by pdmod.

pars_pk

Parameters used by pkmod.

plot_pk

Logical. Should PK concentrations be plotted alongside the PD response. Defaults to TRUE.

ecmpt

Effect-site compartment number. Defaults to the last compartment concentration returned by pkmod.

ylab_con

y-axis label for concentration-time plot

ylab_resp

y-axis label for response-time plot

display

Logical. Should plots be printed or returned as an arrangeGrob object?

pars_prior

Named vector of prior PK or PK-PD parameters

pars_post

Named vector of posterior PK or PK-PD parameters

pk_ix

Indicies of parameter vector(s) corresponding to PK parameters

pd_ix

Indicies of parameter vector(s) corresponding to PD parameters