PRcriteria: Piecewise regression criteria

View source: R/PRcriteria.R

PRcriteriaR Documentation

Piecewise regression criteria

Description

A function to determine if a KM curve is matured.

Usage

PRcriteria(
  smix.chosen,
  timepoints = NULL,
  slope.relative.change.threshold = 0.7,
  ratio.long.short.threshold = 1/3
)

Arguments

smix.chosen

Input. Extracted survival probabilities.

timepoints

Input. Time points of the extracted survival probabilities.

slope.relative.change.threshold

Input. A threshold for the relative change of the slopes of the last segment and the first segment.

ratio.long.short.threshold

Input. A threshold for the ratio of the lengths of the last segment to the first two segments.

Value

knots

knots.

slop.flatline.with.95CI

the slop of the KM tail with 95% CI.

slope.relative.change

the relative change of the slopes of the last segment and the first segment.

ratio.long.short

the ratio of the lengths of the last segment to the first two segments.

sig

TRUE if matured

PReg.fit

the fitted results of piecewise regression.

References

E.P.Y. Lin, C.Y. Hsu, J.F. Chiou et al. (2022). Cox Proportional Hazard Ratios Overestimate Survival Benefit of Immune Checkpoint Inhibitors (ICI): Cox-TEL Adjustment and Meta-analyses of PD-L1 Expression and ICI Survival Benefit. J Thorac Oncol. 17, 1365-1374. doi:10.1016/j.jtho.2022.08.010.

E.P.Y. Lin, C.Y. Hsu, L. Berry, P. Bunn, Y. Shyr (2022). Analysis of Cancer Survival associated with Immune Checkpoint Inhibitors after Statistical Adjustment: A Systematic Review and Meta-analyses. JAMA Network Open. 5(8):e2227211. doi:10.1001/jamanetworkopen.2022.27211.

Examples

library(CoxTEL)
s1mix.chosen <- c(39, 25, 18.2, 16, 14, 12.4, 11, 11)/100
s0mix.chosen <- c(32, 18,  9.9,  8,  4,    3,  1,  1)/100
PRC1 <- PRcriteria(smix.chosen=s1mix.chosen)
PRC0 <- PRcriteria(smix.chosen=s0mix.chosen)
PRC1$sig
PRC0$sig


cyhsuTN/AdjCOXPH documentation built on July 4, 2024, 8:05 p.m.