rmolr: Finding Optimal Cutpoints Using Modified Ordered Logrank...

Description Usage Arguments Details Value References See Also Examples

Description

Using the modified ordered logrank test (MOL), the rmolr function finds two optimal cutpoints to divide the entire dataset into three groups based on a continuous covariate and a survival outcome. It is a fast procedure that makes use of the running logrank test (rlr) to improve on computing speed.

Usage

1
rmolr(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.

Details

When the true association is positive, that is, larger covariate values lead to worse survival, and you enter alt = "decrease", the test statistics will be positive, but if you enter trend = "increase" the test statistics will be negative. Opposite is true when the true association is negative. You want to make sure to enter the option so that the resulting test statistics are positive.

Value

Returns a list with two elements, with the first being the test statistics for all cutpoints considered and the second being the best splits from the MOL tests.

References

See main package help page.

See Also

rsolr12, rhier

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
library(rolr)

##### -------- Example 1

#simulate data with true 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)

#using alt = 'decrease', the test statistics are positive, so the results
#are correct.
res=rmolr(times=d$times, status=d$status, x=d$x, ns=15, alt='decrease')
names(res)

#do it again using alt = 'increase', now the test statistics are negative
#so the results are not right. So you have to switch back to alt='decrease'
#to get positive statistics and the correct optimal cutpoints here.
res2=rmolr(times=d$times, status=d$status, x=d$x, ns=15, alt='increase')
names(res2)

##### -------- Example 2

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

#using alt = 'decrease', the test statistics are negative and so the results
#are not right.
res=rmolr(times=d$times, status=d$status, x=d$x, ns=15, alt='decrease')
res[['best.splits.molr']]

#do it again using alt = 'increase', now the test statistics are positive
#and thus the results are correct.
res2=rmolr(times=d$times, status=d$status, x=d$x, ns=15, alt='increase')
res2[['best.splits.molr']]

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

Related to rmolr in rolr...