rhier: Finding Optimal Cutpoints Using a Hierarchical Method

Description Usage Arguments Value References See Also Examples

Description

Using a hierarchical method, rhier is used to find two optimal cutpoints to divide the entire dataset into three groups based on a continuous covariate and a survival outcome. Making use of the running logrank test (rlr), the method first identifies an optimal cutpoint that gives the largest logrank statistic to split into two groups, and then repeats the process in each of the resulting groups to find additional two cutpoints. It then takes the cutpoint that gives the larger test statistic between the two as the second optimal cutpoint.

Usage

1
rhier(times, status, x, ns = 15, alt = "decrease", method = "approximate")

Arguments

times

Survival outcome.

status

Censoring indicator which takes 1 when an event occurs at end of study and 0 otherwise.

x

A continuous covariate.

ns

Minimum number of subjects in each group after dichotomizing the covariate.

alt

A character that takes either "decrease" or "increase" to represent a positive or negative association between the covariate and survival.

method

A character that takes either "approximate" or "exact" where an approximate or exact method will be used.

Value

Returns a list with one element being the two optimal cutpoints obtained.

References

See main package help page.

See Also

rsolr12, rmolr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(rolr)

#simulate data with true underlying cutpoints and hazard goes up as covariate goes up
d=simdata(nn = 150, hr = c(1, 2, 3), hazard.func = "step",
          props=c(1/3, 1/3, 1/3), censoring.rate = 0)

#finding optimal cutpoints using alt = 'decrease' option
res=rhier(times=d$times, status=d$status, x=d$x, ns=15, alt='decrease')

#do it again using alt = 'increase', the results are the same as earlier
#because it doesn't matter what you choose for the alt option
res2=rhier(times=d$times, status=d$status, x=d$x, ns=15, alt='increase')

rolr documentation built on May 2, 2019, 3:29 p.m.

Related to rhier in rolr...