# calc_hr_pi

From survParamSim v0.1.0
by Kenta Yoshida

##### Generate hazard ratio with prediction intervals from parametric bootstrap simulation

Generate hazard ratio with prediction intervals from parametric bootstrap simulation

##### Usage

```
calc_hr_pi(
sim,
trt,
group = NULL,
pi.range = 0.95,
calc.obs = TRUE,
trt.assign = c("default", "reverse")
)
```

##### Arguments

- sim
A `survparamsim` class object generated by

`surv_param_sim`

function.- trt
A string to specify which column define treatment status to calculate HR. The specified column should have only two levels.

- group
Optional string(s) to specify grouping variable(s). You will have faceted histograms for these variables in

`plot_hr_pi`

function.- pi.range
Prediction interval for simulated HR.

- calc.obs
A logical to specify whether to calculate HR for the observed data. Need be set as FALSE if survival information in the `newdata`` is dummy.

- trt.assign
Specify which of the categories of `trt` need to be considered as control group.

*Documentation reproduced from package survParamSim, version 0.1.0, License: GPL-3*

### Community examples

Looks like there are no examples yet.