reconstruct.bs.mcmcspatsurv: reconstruct.bs.mcmcspatsurv function

View source: R/postprocessing.R

reconstruct.bs.mcmcspatsurvR Documentation

reconstruct.bs.mcmcspatsurv function

Description

When bs(varname) has been used in the formula of a model, this function can be used to reconstruct the posterior relative risk of that parameter over time.

Usage

## S3 method for class 'mcmcspatsurv'
reconstruct.bs(
  mod,
  varname,
  probs = c(0.025, 0.975),
  bw = FALSE,
  xlab = NULL,
  ylab = NULL,
  plot = TRUE,
  ...
)

Arguments

mod

model output, created by function survspat

varname

name of the variable modelled by a B-spline

probs

upper and lower quantiles for confidence regions to plot> The default is c(0.025,0.975).

bw

Logical. Plot in black/white/greyscale? Default is to produce a colour plot. Useful for producing plots for journals that do not accept colour plots.

xlab

label for x axis, there is a sensible default

ylab

label for y axis, there is a sensible default

plot

logical, whether to plot the effect of varname over time

...

other arguments to be passed to the plotting function.

Value

median, upper and lower confidence bands for the effect of varname over time; the funciton also produces a plot.


spatsurv documentation built on Oct. 19, 2023, 9:07 a.m.