Methodology · Chronic Kidney Disease

What Dataset Foundry's Chronic Kidney Disease line actually does

This page is meant to be citable directly in a methodology chapter. Everything below is a design decision, not a discovery — Dataset Foundry does not model real patient data, it encodes a documented set of assumptions about how cardiometabolic risk factors should relate to a CKD diagnosis and, optionally, KDIGO staging, so the relationships can be recovered and used to teach or test statistical methods. This is the second line in the clinical health family, alongside Breast Cancer — it shares that line's toggleable stage-count pattern rather than introducing a new one. See section 1 for what that means.

1. Toggleable one- or two-stage model

Every record starts from the same first stage. What happens after depends on the stage_mode you choose on the generator page:

  1. CKD-diagnosis probability — whether this renal risk assessment is CKD-positive is table-rated, the same technique breast cancer's own core-anchor-plus-loadings table uses. A patient-age-band base CKD-prevalence rate is the anchor; hypertension status and diabetes status each apply the two core multiplicative loadings, with family history of CKD, HIV status, obesity, and region applying further, decorative loadings. This logic is identical in both stage modes and is computed before stage_mode is even consulted — single-stage's entire output, and stage one of two-stage.
  2. KDIGO staging (two-stage only, computed only where a record is CKD-positive) — a GFR category (G1-G5, G3 split into G3a/G3b) modeled as a continuous latent severity score (an intercept plus a weighted sum of patient age and screening pathway, plus decorative diabetes/hypertension effects, plus noise) which is then bucketed into GFR categories, the same "continuous score, then bucket" technique breast cancer's own stage-at-diagnosis modeling uses, applied here to produce an ordinal category instead of a numeric loading. An albuminuria category (A1-A3, drawn from a distribution keyed by diabetes status) and a primary cause (drawn from the requested country's etiology distribution) are computed alongside it.

Single-stage reports CKD-diagnosis status only, no staging fields at all — the same classic diagnostic-classification shape breast cancer's own single-stage mode uses. Two-stage is the default — same "default the richer shape, allow opting down" reasoning the include-names toggle uses on every other line — and additionally reports screening_status, gfr_category, albuminuria_category, and primary_cause for CKD-positive rows (CKD-negative rows carry empty strings for all four, the same "always present on the wire, empty-when-not-applicable" convention breast cancer's own four staging fields already use). Whichever mode you pick is recorded in the dataset's manifest and citation — two downloads of this line in different modes are, citation-wise, two different datasets, since a single-stage download simply has no staging columns at all.

Like breast cancer, this line carries no name field at all — a renal risk assessment record has no natural person-name analogue the way a policyholder or susu-group member does, so there's no include-names toggle to speak of here.

2. The four hypotheses

Two hypotheses drive CKD-diagnosis probability and hold in both stage modes, since stage-one logic doesn't change based on the toggle; the other two are GFR-stage hypotheses that only exist, and are only verified, in two-stage mode, scoped to CKD-positive records — the same conditional-on-occurred technique breast cancer's own stage hypotheses use. Tracked separately below rather than in one undifferentiated table, since which mode a factor actually applies in is the thing a reader needs disambiguated.

FactorStageDirectionRationale encoded
Hypertension status CKD-diagnosis probability both modes Positive Documented as the single most commonly attributed cause of CKD in Ghana — roughly 30% of pooled cases in a Ghana-focused systematic review and meta-analysis — and often poorly controlled regionally, which is why it carries the larger of the two core diagnosis loadings.
Diabetes status CKD-diagnosis probability both modes Positive A real but secondary driver in the same Ghana-focused meta-analysis (under a fifth of pooled cases, versus hypertension's roughly 30%) — unlike many Western case series, where diabetic nephropathy dominates. Still a core hypothesis, just a smaller loading than hypertension's.
Patient age GFR-stage severity two-stage only Positive eGFR mechanically declines with age through nephron loss, independent of any specific disease process, on top of however long a driving condition has had to do cumulative damage — the more mechanistic of the two stage-severity hypotheses, and reuses the same patient_age draw already used as a diagnosis-probability anchor — one field, two roles, the same reuse pattern breast cancer's own tumor_size_mm uses.
Screening pathway (routine vs. incidental/symptomatic) GFR-stage severity two-stage only Positive (incidental/symptomatic) Screening exists specifically to catch reduced kidney function before symptoms appear, so incidentally or symptomatically detected cases are, by construction, caught further along their natural history than routinely screened ones. This line's heavy incidental/symptomatic skew is also what actually drives its GFR-stage distribution toward G3a/G3b — the documented pattern that CKD screening isn't routinely performed in many diabetes/hypertension clinics across sub-Saharan Africa, not a population-level severity assumption bolted on separately.

All four hypotheses are verified at n=20,000, momo's own precedent rather than motor's/health-claims'/property's/breast-cancer's n=5,000 — checked empirically per those lines' own precedent of not assuming a given n holds without checking. Both diagnosis-side directions held comfortably across every regression seed (the weaker of the two, patient age vs. CKD-positive rate, correlating around 0.26-0.31 depending on seed); both stage-severity directions held too, with the weaker of the two (patient age vs. GFR-stage rank) never dropping below roughly 0.25, and the CKD-positive subset comfortably over 5,000 rows per seed at this n.

3. Coefficients

CKD-diagnosis probability is modeled as p = clip(base_rate(age_band) · hypertension_loading · diabetes_loading · family_history_ckd_loading · hiv_status_loading · obesity_loading · region_loading, min_probability, max_probability), where base_rate(age_band) is the age-band base-CKD-prevalence table lookup and every other term is a named multiplicative loading — obesity's loading applies only when BMI is at or above a threshold (a gate, not a small effect, the same technique breast cancer's own postmenopausal-obesity gate uses). A record is then drawn as CKD-positive or CKD-negative from that probability. When the mode is two-stage, GFR category (for CKD-positive records only) is modeled as a continuous latent score, score = intercept + age_over_50_coef · max(patient_age - 50, 0) + screening_status_loading + diabetes_stage_loading + hypertension_stage_loading + ε, then bucketed into G1-G5 (G3 split into G3a/G3b) via ascending score cutoffs tuned so the screening-pathway skew above pushes the resulting distribution toward G3a/G3b, consistent with the low-screening-uptake literature this line models. Albuminuria category is drawn independently from a distribution keyed by diabetes status (diabetic nephropathy presents with higher albuminuria on average); primary cause is drawn independently from the requested country's etiology distribution. These coefficients are illustrative, anchored against general CKD epidemiology literature specific to Ghana and sub-Saharan Africa (a Ghana-focused systematic review and meta-analysis on CKD etiology; Nweke et al.'s pooled sub-Saharan CKD-prevalence estimate; KDIGO's 2012 clinical practice guideline for GFR/albuminuria staging), not derived from any real patient cohort's own data. Exact magnitudes aren't published on this page — see the current defaults, and change them, in the Advanced: customize the model panel on the Chronic Kidney Disease generator if your thesis calls for weaker or stronger effects, and note in your write-up which values you changed from the defaults. The score-to-stage bucketing cutoffs themselves aren't exposed as editable fields — only the score contributions feeding into them are.

4. Determinism

Generation runs server-side using a seeded generator (numpy's default_rng, PCG64) rather than an unseeded source of randomness — same mechanism as every other line on the platform. The same seed, record count, stage mode, generator version, and any advanced-config changes (all stamped in every citation and manifest — see the Cite section on the generator page) will always reproduce byte-identical output. Report the seed, record count, and stage mode alongside your dataset — that combination, together with the generator version, is sufficient for anyone to regenerate exactly what you analyzed.

5. What's decorative vs. load-bearing

Region, family history of CKD, HIV status, obesity, and — on the stage side — albuminuria category, primary cause, and the decorative diabetes/hypertension stage effects exist to make records look like real renal risk assessments and are internally consistent with each other, but they are not the object of the four hypotheses above. Patient age is the one field that plays a load-bearing role on both sides at once — the base-rate anchor on the diagnosis side and, unchanged, one of the two core stage-severity hypotheses — rather than being load-bearing on one side and decorative on the other. This line has no name field of any kind (subtask 0's decision — see section 1), so unlike every other line there is no name-inclusion toggle to gate.

6. Known limitations

  • This is synthetic data. It should never be presented as, or mistaken for, real patient or clinical data in a publication.
  • CKD-diagnosis probability is table-rated with multiplicative loadings, not a from-scratch regression — no interaction effects between hypertension, diabetes, family history, HIV status, and obesity are modeled beyond simple multiplication, unless you add them yourself downstream.
  • The age-band base-CKD-prevalence anchor represents a general adult-population prevalence (roughly 6-38% depending on age band, anchored against a ~15-18% sub-Saharan pooled estimate), not a pre-selected diabetes/hypertension clinic cohort's yield — some published Ghana studies of already-hypertensive/diabetic patients report much higher rates (up to 74% where both conditions are present). Don't read this dataset's CKD-positive rate as that higher, cohort-selected figure.
  • Screening pathway, GFR category, albuminuria category, and primary cause are only present in two-stage mode and only for CKD-positive records — a single-stage download or a CKD-negative record simply has no staging information, by design, not by omission.
  • This line reports a GFR category and an albuminuria category, not a longitudinal progression or dialysis/transplant outcome — a snapshot at assessment, not a model of disease course over time.
  • The Nigeria etiology distribution is illustrative and deliberately close to Ghana's rather than sourced from a single harmonized cross-country registry — same regional pattern (hypertension-and-glomerulonephritis-led, not diabetes-led), not a claim of identical national data.
  • If your thesis needs a different balance between the four hypotheses, adjust the relevant loadings in the Advanced: customize the model panel on the Chronic Kidney Disease generator and say so in your write-up.

7. Citing this tool

Something like: "Synthetic data generated using Dataset Foundry (seed = 42, n = 5,000, stage mode = two-stage), a deterministic Chronic Kidney Disease diagnostic data generator built for this thesis in the absence of accessible real-world clinical data." Include the seed, record count, and stage mode so the exact dataset is reproducible from the tool alone — or use the auto-generated citation block on the generator page, which also includes the generator version, stage mode, and any advanced-config changes.