Test evidence
Stratified survival
Every requirement of this module, the tests named for it, and what each test recorded the last time the evidence was rebuilt.
Summary
- Requirements
- 38
- Tests named for them
- 38 (14 unit, 24 browser)
- Result
- pass every test passing
- Screenshots
- 7
- Recorded
- 2026-10-04 19:02 UTC
- Environment
- linux 6.17.0-1022-azure · node v22.23.3 · playwright 1.61.1 · chromium 149.0.7827.55
The requirements are the rows of the module’s requirement matrix. A test is named for a requirement by starting its name with the requirement’s ID. The results are read from the committed evidence set; continuous integration reruns every test and fails when the committed set no longer matches.
Requirements and their tests
SS-KIT-001 pass
The chart is built from safety.viz's kit on the page: its curves are the kit's
kmEstimate, the descriptive product-limit estimate, drawn with the kit's Chart.js, bundling neither; without safety.viz on the page it is refused with a message saying what is missing.SS-KIT-002 pass
The chart reads no band of the kit's estimate: nothing of its source reads the lower or upper bound or the standard error that
kmEstimatealso returns.SS-CFG-001 pass
Every setting has a default; the outcomes table is read by its endpoint, time and one flag, censored (ADaM's CNSR) or event, exactly one named; the groups are a column or a cut variable; a setting that is not known, or a value it cannot take, is refused with a sentence naming it.
SS-DATA-001 pass
Each participant drawn is in desktop R's group, with R's time and event, for every case: the study by CRP cut at its median, at 4, at its tertiles and at 10, by arm, the women alone, a table flagged by event, and one where an arm has no event.
SS-DATA-002 pass
The outcomes table is read either way round: a flag of events gives the same participants, groups and curves as ADaM's CNSR, and the flag goes to R as the table gives it.
SS-DATA-003 pass
A participant with a group and no usable outcome is left out and counted by reason: no row for the endpoint, more than one, a time or flag missing or not a number, a flag that is not 0 or 1, a time below 0; a logical flag is read as R reads one; an outcome row for no such participant is not used, and counted.
SS-CURVE-001 pass
Each group's curve is the kit's
kmEstimate, and its steps are R'ssurvfit()estimate: the same event times, numbers at risk, events and survival (to 12 decimal places), and the same censored times.SS-RISK-001 pass
The at-risk strip counts, at each time of the axis, the participants of a group whose time is at or after it, and a cell lists those participants, the ones R's data hold there.
SS-RISK-002 pass
On the page, the at-risk strip's counts at each time are R's numbers at risk for each group.
SS-CUT-001 pass
For a cut variable the histogram holds every value the points were worked out on, and a cut line dropped becomes a typed point as its label writes it, four significant digits; a line cannot pass its neighbour, stop where two points are written alike, or leave the values it cuts.
SS-HIST-001 pass
On the page, the histogram shows the values the cut points were worked out on, with a line at each point and how many values fall in each group.
SS-DRAW-001 pass
Event-free survival by CRP at Baseline cut at its median: each group's curve is R's
survfit()estimate step for step with its censored times marked, the legend gives each group's count, and high CRP has the worse survival, as the study was planted.SS-DRAW-002 pass
Groups from a column are drawn by name and a cut at its tertiles makes three curves, low to high, each R's; a column has no histogram.
SS-DRAG-001 pass
Dragging the cut line moves the curves at once and asks R nothing, and the line says R is asked when it is let go; letting it go makes the cut a typed point as its label writes it, held by the Groups control, and asks R once.
SS-DRAG-002 pass
Dropped at 4, R's stored answer for the cut at 4 is found and printed, and the curves are R's for that cut; the left and right arrow keys move the line too.
SS-DRAG-003 pass
An answer asked for before the line was taken hold of is never shown: the line waits for the answer to the cut it is let go at.
SS-DRAG-004 pass
A click on a cut line, with no drag, leaves it where it is and asks R nothing; a drag moves it by as much as the pointer moves, from where it took hold.
SS-DRAG-005 pass
Each cut line is a slider of its own, with its value and how far it can go; its arrow keys move it, the curves at once and R once the keys rest; it stops at its neighbours and inside the values.
SS-STAT-001 pass
R is asked once per view, with one row per participant drawn, and the function, the arguments, the identity and the row count that desktop R's recipe writes; a cut's groups go high to low, so the hazard ratio is the higher group's over the lower's, and a column's by code point; the flag goes under the name the table reads it by.
SS-STAT-002 pass
Handed to a connection as stored results, each of R's answers is found by the chart's request for its view.
SS-STAT-003 pass
R's log-rank test is printed with its method and counts, labelled exploratory and unadjusted; each group's median with its log-log interval, in the legend's order, a median or bound R did not reach reading not reached; and, for two groups, the hazard ratio with its interval, a cut's named high over low.
SS-STAT-004 pass
A hazard ratio R does not estimate is not printed, and R's note says why, as R wrote it (gsm.bio#26).
SS-STAT-005 pass
A group below R's minimum size prints R's reason and counts, and no number.
SS-STAT-006 pass
With no R attached the line says statistics are unavailable, the curves are still drawn, and nothing is fetched.
SS-STAT-007 pass
R's answers stored in the page are found and printed for the women alone, with the filter said, and for a column; a group below R's minimum size prints R's reason.
SS-STAT-008 pass
On the page, where R does not estimate the hazard ratio it is not printed, and R's note says why.
SS-STAT-009 pass
Once the connection is replaced, a late answer from the old one changes neither the line nor what
chart.statistics()reports.SS-STAT-010 pass
Where some participants have a value and no outcome, a cut's points are worked out on those drawn, as R's
Analyze_Screentakes its median: the cut, each group's count and R's answer are desktop R's, and the footnote says who is cut.SS-NEED-001 pass
Loaded without an outcomes table, the chart says it needs one, draws nothing and keeps its controls; given one, it draws; an outcomes table without a column a setting names is refused by name.
SS-EVENT-001 pass
An outcomes table flagged by event is read the other way round on the page: the same curves, and R is asked with
strEventColand finds its answer;event_colnamed alone later, throughsetSettingsorsetData, reads it so too.SS-LIST-001 pass
A click on a curve lists its group's participants, and a count of the at-risk strip those it counts, the ones R puts there; a click away from every curve lists nothing, and the legend hides nothing; a row opens safety.viz's participant profile of that participant.
SS-FAIL-001 pass
When drawing fails the chart says so in its element and keeps its controls, leaving nothing half drawn, and draws again once it can.
SS-MOBILE-001 pass
At 390 pixels the controls are folded away, the at-risk strip fits or scrolls inside its own box, and the page does not scroll sideways.
SS-SITE-001 pass
The live demo holds at a 390-pixel-wide viewport with no horizontal scroll, with the controls open; each count of the at-risk strip stays on one line, the strip scrolling in its own box.
SS-SITE-002 pass
The gallery lists the chart with links to its live demo, its evidence page and its API reference; the demo opens on event-free survival by CRP at Baseline cut at its median, and draws the curves where R cannot be reached and says so.
SS-SITE-003 pass
The API reference has a table row for every setting the chart has, with the default the code has; the site build fails when one is missing.
SS-LIVE-001 pass
Against R and the survival package started in the browser on the demo: the log-rank p, each median with its interval and the hazard ratio with its interval equal desktop R's within 1 part in 10^8, before and after the cut line is moved to 4.
SS-LIVE-002 pass
Against R in the browser: by arm, a column, equals desktop R's.
Checking this page
npm ci
npm run evidence:check # rerun every test and compare with the committed evidence set
npm run evidence # rebuild docs/evidence/stratified-survival/evidence.json






