Utility function to extract HR estimates from piece-wise exponential model fit in (format needed for ggplot)

get_pwe_contrasts(
  fit,
  treatments = NULL,
  ref,
  reverse = FALSE,
  exponentiate = TRUE,
  xmax = 24,
  digits = 3,
  alpha = 0.05
)

Arguments

fit

rjags object which is the return of R2jags::jags()

treatments

Vector of treatment names (character string) ordered according to array indexes in jags fit. If NULL treatments extracted from fit

ref

Character string identifying reference treatment to use in calculating contrasts.

reverse

Logical, if TRUE (default) "ref vs others" is calculated (instead of "others vs ref").

exponentiate

Logical, if TRUE (default) contrast estimates are exponentiated in output.

xmax

Numeric

digits

Numeric

alpha

Numeric

Value

A data.frame contatining hazzard ratio estimates from an rjags object which is the return of R2jags::jags()