rsolr12: Finding Optimal Cutpoints Using Simple Ordered Logrank (SOL)...

Description Usage Arguments Details Value References See Also Examples

Description

Using two simple ordered logrank tests (SOL-1 and SOL-2), the rsolr12 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
2
rsolr12(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 association is positive, that is, larger covariate values leading 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 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 three elements, the first one being the test statistics for all cutpoints considered (except the first and last ns points), and the second and third elements being the best splits obtained from using the SOL-1 and SOL-2 tests.

References

See main package help page.

See Also

rmolr, 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
35
36
37
library(rolr)

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

#simulate data with 2 underlying true cutpoints and hazard goes up as x 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 it is good
res=rsolr12(times=d$times, status=d$status, x=d$x, ns=15, alt='decrease')
names(res)
res[['best.splits.solr1']]
res[['best.splits.solr2']]

#do it again using alt = 'increase', now the test statistics are negative and
#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=rsolr12(times=d$times, status=d$status, x=d$x, ns=15, alt='increase')
res2[['best.splits.solr1']]
res2[['best.splits.solr2']]

##### -------- 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 (so the results
#are not right).
res=rsolr12(times=d$times, status=d$status, x=d$x, ns=15, alt='decrease')
res[['best.splits.solr1']]
res[['best.splits.solr2']]

#do it again using alt = 'increase', now it is right
res2=rsolr12(times=d$times, status=d$status, x=d$x, ns=15, alt='increase')
res2[['best.splits.solr1']]
res2[['best.splits.solr2']]

Example output

Best splits from SOL-1 : 0.6442953 1.234899
Best splits from SOL-2 : 0.7651007 1.785235 

[1] "stats.at.all.splits" "best.splits.solr1"   "best.splits.solr2"  
   split1    split2 
0.6442953 1.2348993 
   split1    split2 
0.7651007 1.7852349 
Best splits from SOL-1 : 0.2818792 1.758389
Best splits from SOL-2 : 0.2818792 1.758389 

   split1    split2 
0.2818792 1.7583893 
   split1    split2 
0.2818792 1.7583893 
Best splits from SOL-1 : 0.2013423 1.785235
Best splits from SOL-2 : 0.2013423 1.785235 

   split1    split2 
0.2013423 1.7852349 
   split1    split2 
0.2013423 1.7852349 
Best splits from SOL-1 : 0.2818792 1.355705
Best splits from SOL-2 : 0.6979866 1.355705 

   split1    split2 
0.2818792 1.3557047 
   split1    split2 
0.6979866 1.3557047 

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

Related to rsolr12 in rolr...