R's test of the curves the stratified survival chart opens on, as a table:
a row for the log-rank test, with its counts and p-value, then a row for
each group's median survival, in the legend's order, and one for the hazard
ratio, each with its interval. A cut's hazard ratio is the higher group's
over the lower's, and is named so. The numbers are Analyze_Survival()'s on
the rows the chart draws.
Usage
Table_StratifiedSurvival(
dfResults,
dfParticipants = NULL,
lSettings = list(),
dfOutcomes = NULL
)Arguments
- dfResults
data.frameLong-format results, one row per participant, biomarker and visit. Column names are supplied bylSettings; the defaults expectUSUBJID/TEST/STRESN/VISIT/VISITNUM/STRESU, the columns of Synthetic_Results.- dfParticipants
data.frameOne row per participant, orNULL. With it the chart has filters, offers its category columns to the Groups control, and its numbers can be cut. Default:NULL.- lSettings
listbio.viz stratified survival settings, asWidget_StratifiedSurvival()takes them, andtitle,subtitleandfootnotes. Default:list().- dfOutcomes
data.frameThe outcomes table, asWidget_StratifiedSurvival()takes it. A table needs one.
Value
A data.frame of text: Statistic, Method, Estimate, Counts,
p-value and Note, with the attributes of Table_GroupComparison().
Titles and footnotes
As for Visualize_StratifiedSurvival(): {endpoint}, {group}, {n},
{filters}, {date} and {version}.
Display rules
A p-value is written to three decimals, p < 0.001 below that and
p > 0.999 above, never with stars. Every row is labelled exploratory, with
its adjustment named when it has one. An estimate is written to four
significant digits with its confidence interval. A statistic R did not
compute has no p-value, and its note is R's reason.
Examples
Table_StratifiedSurvival(
Synthetic_Results,
Synthetic_Participants,
lSettings = list(
endpoint = "EFS",
group_by = list(measure = "CRP", visit = "Baseline", cut = "median")
),
dfOutcomes = Synthetic_Outcomes
)
#> Statistic
#> 1 Log-rank test
#> 2 Median (≤ 2.783)
#> 3 Median (> 2.783)
#> 4 Hazard ratio, high over low (> 2.783 / ≤ 2.783)
#> Method
#> 1 Log-rank test
#> 2 Kaplan-Meier, survfit() with the log-log interval
#> 3 Kaplan-Meier, survfit() with the log-log interval
#> 4 Cox proportional hazards, coxph()
#> Estimate
#> 1
#> 2 23.32, 95% confidence interval 17.32 to not reached
#> 3 8.28, 95% confidence interval 5.24 to 9.71
#> 4 3.523, 95% confidence interval 2.43 to 5.107
#> Counts p-value Note
#> 1 > 2.783 n = 100, ≤ 2.783 n = 100 p < 0.001 Exploratory, unadjusted.
#> 2
#> 3
#> 4