For the complete documentation index, see llms.txt. This page is also available as Markdown.

Clinico-pathological Table 1

Summarize a cohort's clinical and pathological characteristics in a Table 1, including continuous and categorical variables, missing data, and statistical comparisons between groups.

Summarize a cohort's clinical and pathological characteristics in a Table 1, including continuous and categorical variables, missing data, and statistical comparisons between groups.

Clinico-pathological Table 1

Description

Analysis summary

Standard descriptive table appearing in clinical papers ('Table 1'), whose central purpose is comparing groups: whether they are balanced or genuinely differ. For a cohort it reports per-variable summary statistics — continuous variables as mean (SD) or median [Q1,Q3] kept raw, categorical as n (%) — a Missing count per variable, and, when a grouping is given, a per-variable between-group hypothesis test with its p-value.

Computation

Wraps the tableone Python package (https://tableone.readthedocs.io/en/latest/) on a wide per-patient table. Numeric columns are summarised as continuous (mean (SD), or median [Q1,Q3] for variables flagged non-normal) and string columns as categorical (n (%)), with a Missing count per variable; the variable-type split can be overridden per column. With a grouping column, each distinct group becomes a table column alongside an optional Overall column, and every variable is compared between groups: a per-variable hypothesis test with its p-value and the test's name, plus a standardized mean difference (SMD) per pair of groups — an effect size that quantifies how large an imbalance is regardless of sample size. Distribution diagnostics (normality, multimodality, far outliers) are computed within each group and reported as remarks below the table with suggested follow-ups, alongside per-group sparkline histograms of the continuous variables when enabled. Variables with no observation to summarise (100% missing cohort-wide, or within one group for continuous ones) are held out and reported as their own empty rows plus a note instead of failing the table. With no grouping (or a single group value) the table simply describes the whole cohort, without p-values or SMD.

When to use

Use for per-variable summary statistics of a cohort: a baseline 'Table 1' / cohort characterization, data availability & completeness ('how many patients have X measured ?', via the counts and the Missing column), whether a cohort is balanced, representative or skewed on a variable, and comparing subpopulations or cohorts to test for balance / imbalance (e.g. responders vs non-responders, cohort A vs cohort B) with per-variable p-values. Aggregation_analysis reduces ONE measurement to a distribution or to group-means; multi_variable_summary_analysis only counts the categories of several discrete or binned variables per group; this one reports the full descriptive statistics per variable — mean (SD) / median [Q1,Q3], n (%), and the between-group test — rather than a reduction or a count.

Caveats

Descriptive only — it has no concept of censoring, so never pass censored / time-to-event endpoints (survival times with their event flags); use the survival analyses for those. The p-value says whether groups differ, not how much — read it together with the SMD, which quantifies the size of an imbalance regardless of sample size. P-values are uncorrected across variables unless a multiple-testing correction is requested; with many variables, uncorrected p-values overstate significance.

tableone — the Python package producing summary-statistics tables. Documentation: https://tableone.readthedocs.io/en/latest/ — method paper: Pollard et al., JAMIA Open 2018, https://pmc.ncbi.nlm.nih.gov/articles/PMC6951995/.

Example questions

example questions
  • Table 1 of clinical characteristics for a cohort.

  • Compare clinico-pathological features between two groups, with p-values.

  • How biased / skewed is this cohort with respect to age compared to a baseline cohort ?

  • Are two patient groups imbalanced ?

  • How confident are we in a gene's expression as a marker of treatment-response groups ?

Input columns

input columns
column
type
required
description

patient_id

any

required

Patient identifier — one row per patient. Excluded from the summarised variables.

x_group

categorical

optional

Optional single grouping variable — one Table-1 column per group, plus a p-value. Encode ANY comparison here in SQL (two groups in one cohort, two cohorts, one…

any

optional

Any additional columns to summarise — whatever the SQL SELECT'd besides patient_id and x_group. Numeric columns are summarised as continuous (mean (SD), or med…

Visualizations

  • clinico_pathological_table How to read: The result renders as the table itself, not a chart: one row per variable (its summary type appended to the label), one column per group plus an optional Overall column, a Missing count column, and — when grouped — the p-value with the test's name and the SMD per pair of groups. Continuous rows read as mean (SD) or median [Q1,Q3] (per the non-normal flag, and min/max where requested); categorical rows as n (%); sparkline columns show each group's distribution shape when enabled. Below the table, a note lists the variables held out for having no observation to summarise, and remarks flag the distribution diagnostics (multimodality, far outliers, non-normality) with suggested follow-ups.

Example analysis 1

Name — Clinico-pathological characteristics (Bladder, MOSAIC)

Analysis parameters

analysis_name, analysis_params, viz_params

Visualization — clinico_pathological_table

Output table

Clinico-pathological characteristics (Bladder, MOSAIC)

Missing
Overall
Histogram

n

15

age, median [Q1,Q3]

0

68.0 [64.0,74.0]

▂▆▁█▁█▄▂

gender, n (%)

female

4 (26.7)

male

11 (73.3)

smoking_status, n (%)

None

3 (20.0)

tobacco_former_smoker

7 (46.7)

tobacco_non_smoker

1 (6.7)

tobacco_smoker

4 (26.7)

alcohol_intake, n (%)

None

4 (26.7)

alcohol_active_drinker

7 (46.7)

alcohol_former_drinker

2 (13.3)

alcohol_non_drinker

2 (13.3)

clinical_t_stage, n (%)

None

1 (6.7)

t1

6 (40.0)

t2

5 (33.3)

t3

2 (13.3)

t4

1 (6.7)

clinical_n_stage, n (%)

None

13 (86.7)

n0

2 (13.3)

clinical_m_stage, n (%)

None

9 (60.0)

m0

6 (40.0)

clinical_tnm_stage, n (%)

ct1nxm0

2 (13.3)

ct1nxmx

4 (26.7)

ct2nxm0

1 (6.7)

ct2nxmx

4 (26.7)

ct3n0m0

1 (6.7)

ct3nxmx

1 (6.7)

ct4n0m0

1 (6.7)

ctxnxm0

1 (6.7)

pathological_t_stage, n (%)

t2

3 (20.0)

t3

10 (66.7)

t4

2 (13.3)

pathological_n_stage, n (%)

None

1 (6.7)

n0

8 (53.3)

n1

2 (13.3)

n2

4 (26.7)

pathological_m_stage, n (%)

None

12 (80.0)

m0

3 (20.0)

primary_tumor_diameter, median [Q1,Q3]

0

48.0 [32.5,70.0]

▆▄█▄▁▄▂▂

metastasis, n (%)

False

9 (60.0)

None

6 (40.0)

histological_subtype, n (%)

squamous_cell_neoplasm

1 (6.7)

urothelial_carcinoma

14 (93.3)

growth_pattern_type_in_tumor, n (%)

papillary_growth_pattern

2 (13.3)

solid_mass_growth_pattern

13 (86.7)

residual_tumor_classification, n (%)

r0

12 (80.0)

r1

3 (20.0)

has_received_chemotherapy, n (%)

false

12 (80.0)

true

3 (20.0)

chemotherapy_best_response, n (%)

None

12 (80.0)

complete_response

1 (6.7)

progressive_disease

1 (6.7)

unknown

1 (6.7)

chemotherapy_treatment_setting, n (%)

None

12 (80.0)

adjuvant

3 (20.0)

has_received_surgery, n (%)

true

15 (100.0)

surgery_treatment_setting, n (%)

surgery

15 (100.0)

has_received_immunotherapy, n (%)

false

11 (73.3)

true

4 (26.7)

immunotherapy_best_response, n (%)

None

11 (73.3)

progressive_disease

3 (20.0)

unknown

1 (6.7)

immunotherapy_treatment_setting, n (%)

None

11 (73.3)

systemic_therapy

4 (26.7)

ecog, 100% missing

15

menopausal_status, 100% missing

15

pathological_tnm_stage, 100% missing

15

primary_tumor_side, 100% missing

15

radiotherapy, 100% missing

15

surgery_type, 100% missing

15

NOT SUMMARISED — 6 variable(s) have no observation to summarise, reported as empty rows (out of 15 rows):

  • ecog: 100% missing.

  • menopausal_status: 100% missing.

  • pathological_tnm_stage: 100% missing.

  • primary_tumor_side: 100% missing.

  • radiotherapy: 100% missing.

  • surgery_type: 100% missing.

Last updated

Was this helpful?