Joining the tables is easy. What is hard is deciding, afterwards, what you are allowed to say.
Now we tie the infiltration rate to clinical information. The TCGA clinical table
curated by UCSC Xena carries age, sex, stage and survival, and joins to our table on the
patient barcode.
One rule first. Count each patient once.
A patient with two slides entering twice has twice the influence on the result.
So til.patients() keeps only the slide with the most tissue per patient.
5,201 slides become 4,750 patients.
PythonRuns in your browser
p = 2.6 × 10⁻⁶. Statistically, "infiltration differs by stage" is true.
PythonRuns in your browser
But by how much? The gap between the highest stage (I, 6.11%) and the lowest
(II, 4.77%) is 1.34 pp.
The measurement error we found in lesson 11 was 1.8 pp.
The difference we found is smaller than the measurement error.
And the direction is odd too. It falls from I to II and rises again from II to III.
This is not a tidy monotone story about "infiltration dropping as stage rises".
Click through stage, age and sex. The table below splits by cancer type.
Loading…
The impression from the pooled table scatters once the cancer types are separated.
PythonRuns in your browser
🤔 Check yourself
How should you report 'p = 2.6 × 10⁻⁶ but a gap of 1.34 pp' for the stage difference?
Answer Report the p-value and the effect size together. Above all, the size relative to the measurement error is what a reader needs in order to judge clinical meaning.
🤔 Check yourself
Why keep only one slide per patient?
Answer The statistical unit must be 'patient', not 'slide'. Let one person in twice and the independence assumption breaks, making the p-value smaller than it should be.