plot.classCoMiRe {CoMiRe}R Documentation

CoMiRe plot

Description

An S3 plot method for an object of classCoMiRe class.

Usage

## S3 method for class 'classCoMiRe'
plot(
  x,
  y,
  xobs,
  mcmc,
  J = 10,
  H = 10,
  a = NULL,
  max.x = max(xobs),
  bandwidth = 20,
  x.grid = NULL,
  xlim = c(0, max(xobs)),
  ylim = c(0, 1),
  xlab = "x",
  alpha = 0.05,
  risk = TRUE,
  bmd = TRUE,
  level,
  oneevery = 20,
  ...
)

Arguments

x

the output of comire.gibbs, an object of the classCoMiRe class.

y

numeric vector for the response used in comire.gibbs.

xobs

numeric vector for the covariate relative to the dose of exposure used in comire.gibbs.

mcmc

a list giving the MCMC parameters.

J

parameter controlling the number of elements of the I-spline basis

H

total number of components in the mixture at x_0.

a

optional threshold of clinical interest for the response variable.

max.x

maximum value allowed for x.

bandwidth

the kernel bandwidth smoothing parameter for the post.pred.check plot.

x.grid

optional numerical vector giving the actual values of the grid for x for plotting the additional risk function. If x.gird is not provided, standard grids are automatically used.

xlim, ylim

numeric vectors of length 2, giving the x and y coordinates ranges for the plot.

xlab

the title of the x axis.

alpha

level of the credible bands, default 0.05

risk

if TRUE the additional risk plot via riskplot is computed.

bmd

if TRUE the benchmark dose plot via bmd.plot is computed.

level

if bmd=TRUE, dose levels of interest for BMD plot.

oneevery

integer number representing how many MCMC draws to plot in the posterior predictive check. It draws one sample every oneevery.

...

additional arguments to be passed.

Details

The output is a list of ggplot2 plots containing the result of the betaplot function and, if the threshold a is provided, of post.pred.check, riskplot, bmd.plot.

Value

If a=NULL returns only betaplot otherwise, if risk=FALSE and bmd=FALSE returns a list containing betaplot (which is automatically plotted) and post.pred.check plot. Finally, if a is provided, risk=TRUE and bmd=TRUE returns a list with betaplot, post.pred.check, riskplot and bmd.plot.

Author(s)

Antonio Canale, Arianna Falcioni


[Package CoMiRe version 0.8 Index]