Skip to contents

Summary plot of model prior

Usage

# S3 method for srpmodel
plot(
  x,
  parameter_sample = NULL,
  seed = 42L,
  nsim = 500L,
  warmup = 250,
  nuts_control = list(),
  dt_interval = NULL,
  dt_n_grid = 25,
  dt_expand = 1.1,
  dt_grid = NULL,
  confidence = NULL,
  ...
)

Arguments

x

the model to plot

parameter_sample

a stanfit object with samples from the respective model.

seed

integer, fixed random seed; NULL for no fixed seed

nsim

integer, number of samples to draw

warmup

integer, number of warm-up samples for the MCMC sampler before retaining samples; see warmup parameter in rstan::stan().

nuts_control

list, parameters for NUTS algorithm see control argument inrstan::stan()

dt_interval

numeric vector of length two with minimal and maximal time (relative to individual first visit) to use for plotting

dt_n_grid

number of grid points to use when automatically choosing plotting interval

dt_expand

expansion factor for upper plotting limit when using automatic interval detection

dt_grid

numeric vector of time points to use for plotting

confidence

numeric in (0, 1) confidence level for point-wise confidence bands around mean; none plotted if NULL.

...

further arguments passed to method implementations

Value

A patchwork object, see patchwork::patchwork

Examples

if (FALSE) {
mdl <- create_srpmodel(A = define_srp_prior())
plot(mdl)
}