equiflow

Generate CONSORT-style equity bias diagrams with standardized mean differences from clinical cohorts.

40|17|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/hannesill/m4 --skill equiflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: equiflow
Source: https://github.com/hannesill/m4/tree/main/src/m4/skills/clinical/equiflow
Command: npx skills add https://github.com/hannesill/m4 --skill equiflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, equiflow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Generates equity-focused cohort flow diagrams that track demographic, socioeconomic, and outcome variables at each exclusion step and compute standardized mean differences to detect selection bias.

Core Features & Use Cases

  • Auto-detection of equity variables from your dataset (gender/age/race/etc.)
  • Produce CONSORT-style diagrams and SMD bias checks across exclusion steps
  • Works with clinical datasets (e.g., MIMIC-IV, eICU) and supports custom cohorts
  • Python API: CohortFlow wrapper to build, filter, and visualize the cohort with PDF output

Quick Start

Create a CohortFlow from your dataframe, apply exclusions with exclude(), and generate the visualization by calling plot().

Frequently Asked Questions about equiflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect selection bias when building a clinical cohort from MIMIC-IV?

You can visualize cohort flow and selection bias by applying sequential exclusion steps to a dataframe and rendering a CONSORT-style PDF diagram that overlays standardized mean differences for equity variables at each filtering stage.

Can I generate a CONSORT-style flow diagram with bias checks in Python?

The CohortFlow wrapper auto-detects default equity variables like gender, age, and race from your dataset, while also supporting custom variable sets so you can track specific demographic or socioeconomic factors relevant to your research.

Does equiflow work with eICU datasets or only MIMIC-IV?

You need a pandas dataframe containing your clinical cohort data, along with numpy installed, to use the CohortFlow wrapper for filtering, tracking equity variables, and generating standardized mean difference bias checks.

What is the best way to track demographic changes across patient exclusion steps?

Standardized mean difference bias checks quantify equity shifts during cohort filtering, measuring how much demographic and socioeconomic distributions deviate at each exclusion step to ensure transparent participant flow reporting.