| plot_hazard_ratio | R Documentation | 
For use with non-proportional hazards models (survextrap(...,nonprop=TRUE)).   Intended as a quick check of a model fit, so there are
limited customisation options.
The underlying data can be extracted with hazard_ratio.
plot_hazard_ratio(
  x,
  newdata = NULL,
  t = NULL,
  tmax = NULL,
  niter = NULL,
  ci = TRUE,
  xlab = "Time",
  ylab = "Hazard ratio",
  line_size = 1.5,
  ci_alpha = 0.2
)
| x | A fitted model object as returned by  | 
| newdata | A data frame with two rows.  The hazard ratio will
be defined as hazard(second row) divided by hazard(first row).
If the only covariate in the model is a factor with two levels,
then  Standardisation (with  | 
| t | Vector of times at which to compute the estimates. | 
| tmax | Maximum time at which to compute the estimates.  If
 | 
| niter | Number of MCMC iterations to use to compute credible intervals. Set to a low value to make this function quicker, at the cost of some approximation error (which may not be important for plotting or model development). | 
| ci | If  | 
| xlab | X-axis label | 
| ylab | Y-axis label | 
| line_size | Passed to  | 
| ci_alpha | Transparency for the credible interval ribbons | 
A ggplot2 plot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.