hr.thregI: perform hazard ratio for threshold regression model

Description Usage Arguments Examples

Description

Returns the hazard ratios at a selected time for specified scenarios of the threshold regression model.

Usage

1
2
## S3 method for class 'thregI'
hr(object,var,timevalue,scenario)

Arguments

object

a thregI object.

var

specifies the categorical variable which is required for the hazard ratios. Transform this variable into factor variable that has been used in thregI(). The lower level of the factor variable of var is the reference level of hazard ratio.

timevalue

specifies the desired time at which the hazard ratios would like to be had. A vector is allowed for this argument.

scenario

specifies the values of all variables that considered in the thregI() except variable of var.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#load the data "bcos"
data("bcos", package="thregI")

#transform the "treatment" variable into factor variable f.treatment
bcos$f.treatment=factor(bcos$treatment)

#fit the threshold regression model on the factor variable f.treatment
fit<-thregI(Surv(left, right, type='interval2')~f.treatment|f.treatment,data=bcos)

#hazard ratio of the radiation group vs. the radiation with chemotherapy at fifth month
hr.thregI(fit, var = f.treatment, timevalue = 5)

Example output

Loading required package: survival
Loading required package: Formula
There were 50 or more warnings (use warnings() to see the first 50)
     timevalue f.treatmentRadiation
[1,]         5             2.606004

thregI documentation built on May 2, 2019, 6:27 a.m.

Related to hr.thregI in thregI...