rwd-cohort-analysis

Standardize real-world data cohort identification, medication adherence measurement, and comparative treatment effect estimation.

13|5|Updated May 4, 2026
One-click install
npx skills add https://github.com/awslabs/hcls-agent-skills --skill rwd-cohort-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rwd-cohort-analysis
Source: https://github.com/awslabs/hcls-agent-skills/tree/main/skills/rwd-cohort-analysis
Command: npx skills add https://github.com/awslabs/hcls-agent-skills --skill rwd-cohort-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lifelines, statsmodels, pandas, scikit-learn.

What problem does it solve?

This skill addresses the complexity of transforming raw administrative claims or EHR data into rigorous, reproducible comparative effectiveness evidence, reducing the risk of methodological errors in observational research.

Core Features & Use Cases

  • Cohort Identification: Automates patient selection using ICD-10, NDC, and CPT codes with washout period logic.
  • Adherence & Survival Analysis: Calculates PDC/MPR metrics and executes Kaplan-Meier or Cox proportional hazards models.
  • Causal Inference: Provides propensity score estimation, balance diagnostics (SMD), and IPTW weighting to adjust for confounding.

Quick Start

Use the rwd-cohort-analysis skill to identify a new-user cohort for diabetes medication and calculate their PDC adherence over a 365-day period.

Frequently Asked Questions about rwd-cohort-analysis

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

FAQPage Schema
How do I identify patient cohorts from administrative claims data using ICD-10 and NDC codes?

Propensity score matching and IPTW weighting adjust for confounding in comparative effectiveness research by estimating treatment probabilities and creating balanced cohorts. This skill provides balance diagnostics like SMD to ensure statistical validity in observational studies.

How do I calculate medication adherence using PDC and MPR metrics for a new-user cohort?

To calculate medication adherence for a new-user cohort, this skill computes PDC and MPR metrics over a specified period. It standardizes adherence measurement for real-world data, supporting analysis over a 365-day period or other customized timeframes.

Can I use lifelines and statsmodels for survival analysis on EHR data?

Yes, you can use lifelines and statsmodels for survival analysis on EHR data. This skill requires these Python libraries to execute Kaplan-Meier curves and Cox proportional hazards models, ensuring statistical validity for real-world data analysis.

What is the best way to estimate comparative treatment effects in observational research?

The best way to estimate comparative treatment effects in observational research is through a standardized pipeline that combines propensity score matching, IPTW weighting, and survival regression models. This approach reduces methodological errors when using real-world data.

Do I need Python and pandas to perform real-world data cohort analysis?

This skill focuses on standardizing cohort identification, medication adherence, and treatment effect estimation. For limitations, it relies on administrative claims and EHR data, and requires washout period logic and propensity score adjustments to mitigate confounding risks in observational research.