epidemiology-guide
Epidemiological study designs, measures of association, and public health ana...
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Epidemiological study designs, measures of association, and public health ana...
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
公司金融实证研究的"漏斗式选题查找器"。互动开场先后询问 (1) 研究方向、(2) 候选标题数量 N, 再扫描全球文献(已出版英文学术期刊 + SSRN working paper + 全球高校 department seminar 1 年内日程),基于 Edmans (2024) "1000 Rejections" 红线生成 N 个候选标题,**通过并行 subagent(Agent 工具)批量生成计划书 + 查新;每个 subagent 必须强制调用 Skill 工具加载 econfin-proposal 与 novelty-check 两个预设 skill 完成各自模块**,**只有当 novelty score >= 9 时(即 JF/JFE/RFS 顶刊层次),subagent 才把 proposal + 查新报告合并的 md 写入 F:\Dropbox\CC\选题大全\<研究方向短名>\(以"简短选题名称-分数"命名,子文件夹名由 Step 0 从用户输入的研究方向派生);< 9 分的选题在 subagent 内部直接丢弃,绝不写盘、绝不输出**。当用户说"找选题"、"帮我找选题"、"想做 X 方向"、 "empirical CF idea search"、"批量生成研究计划书"、"100 ideas"、"econfin-idea-finder" 时触发。
Create and compile beautiful Beamer presentations following the Rhetoric of Decks philosophy. Use when making slides, creating decks, or compiling .tex presentation files.
Scaffold a new research project with standard directory structure, CLAUDE.md template, and documented README. Use this at the start of every new project to ensure consistent organization.
Download, split, and deeply read academic PDFs. Use when asked to read, review, or summarize an academic paper. Splits PDFs into 4-page chunks, reads them in small batches, and produces structured reading notes — avoiding context window crashes and shallow comprehension.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
| name | epidemiology-guide |
| description | Epidemiological study designs, measures of association, and public health ana... |
| metadata | {"openclaw":{"emoji":"🔬","category":"domains","subcategory":"biomedical","keywords":["epidemiology","public health","evidence-based medicine","clinical medicine","disease surveillance"],"source":"wentor"}} |
A skill for designing and analyzing epidemiological studies. Covers study design selection, measures of disease frequency and association, bias assessment, and public health data analysis methods.
Evidence Strength
|
Systematic Review / Meta-Analysis (Highest)
|
Randomized Controlled Trial
|
Cohort Study (Prospective)
|
Case-Control Study
|
Cross-Sectional Study
|
Case Report / Case Series (Lowest)
| Design | Research Question | Time | Cost | Bias Risk |
|---|---|---|---|---|
| RCT | Does intervention X prevent outcome Y? | Years | Very high | Lowest |
| Prospective Cohort | Does exposure X increase risk of Y? | Years | High | Moderate |
| Retrospective Cohort | Historical exposure-outcome relationship? | Months | Moderate | Moderate-High |
| Case-Control | What exposures are associated with rare disease? | Months | Low | High |
| Cross-Sectional | What is the prevalence of X? | Weeks | Low | High |
| Ecological | Do population-level factors correlate with disease? | Weeks | Very low | Very high |
import numpy as np
def compute_measures(cases: int, population: int,
person_time: float = None,
period_years: float = 1.0) -> dict:
"""
Compute basic epidemiological measures.
Args:
cases: Number of new cases (for incidence) or existing cases (for prevalence)
population: Population at risk
person_time: Person-years of follow-up (for incidence rate)
period_years: Time period in years (for cumulative incidence)
"""
measures = {}
# Point prevalence
measures['prevalence'] = {
'value': cases / population,
'per_1000': (cases / population) * 1000,
'formula': 'cases / population at a point in time'
}
# Cumulative incidence (risk)
measures['cumulative_incidence'] = {
'value': cases / population,
'per_1000': (cases / population) * 1000,
'period_years': period_years,
'formula': 'new cases / population at risk during time period'
}
# Incidence rate (if person-time available)
if person_time:
measures['incidence_rate'] = {
'value': cases / person_time,
'per_1000_py': (cases / person_time) * 1000,
'formula': 'new cases / person-time at risk'
}
return measures
def measures_of_association(a: int, b: int, c: int, d: int) -> dict:
"""
Compute epidemiological measures of association from a 2x2 table.
Disease+ Disease-
Exposed+ a b a+b
Exposed- c d c+d
a+c b+d N
Args:
a: Exposed with disease
b: Exposed without disease
c: Unexposed with disease
d: Unexposed without disease
"""
# Risk in exposed and unexposed
risk_exposed = a / (a + b)
risk_unexposed = c / (c + d)
# Risk Ratio (Relative Risk)
rr = risk_exposed / risk_unexposed
ln_rr = np.log(rr)
se_ln_rr = np.sqrt(1/a - 1/(a+b) + 1/c - 1/(c+d))
rr_ci = (np.exp(ln_rr - 1.96*se_ln_rr), np.exp(ln_rr + 1.96*se_ln_rr))
# Odds Ratio
or_val = (a * d) / (b * c)
ln_or = np.log(or_val)
se_ln_or = np.sqrt(1/a + 1/b + 1/c + 1/d)
or_ci = (np.exp(ln_or - 1.96*se_ln_or), np.exp(ln_or + 1.96*se_ln_or))
# Attributable Risk (Risk Difference)
ar = risk_exposed - risk_unexposed
se_ar = np.sqrt(risk_exposed*(1-risk_exposed)/(a+b) +
risk_unexposed*(1-risk_unexposed)/(c+d))
ar_ci = (ar - 1.96*se_ar, ar + 1.96*se_ar)
# Attributable Fraction in Exposed
af_exposed = (rr - 1) / rr
# Population Attributable Fraction
prevalence_exposure = (a + b) / (a + b + c + d)
paf = prevalence_exposure * (rr - 1) / (prevalence_exposure * (rr - 1) + 1)
return {
'risk_ratio': {'value': round(rr, 3), 'ci_95': tuple(round(x, 3) for x in rr_ci)},
'odds_ratio': {'value': round(or_val, 3), 'ci_95': tuple(round(x, 3) for x in or_ci)},
'risk_difference': {'value': round(ar, 4), 'ci_95': tuple(round(x, 4) for x in ar_ci)},
'attributable_fraction_exposed': round(af_exposed, 3),
'population_attributable_fraction': round(paf, 3),
'number_needed_to_harm': round(1/ar, 1) if ar > 0 else None
}
# Example: smoking and lung cancer
result = measures_of_association(a=80, b=920, c=10, d=990)
print(f"RR: {result['risk_ratio']['value']} ({result['risk_ratio']['ci_95']})")
print(f"OR: {result['odds_ratio']['value']} ({result['odds_ratio']['ci_95']})")
print(f"PAF: {result['population_attributable_fraction']}")
| Bias Type | Description | Mitigation Strategy |
|---|---|---|
| Selection bias | Non-random sample selection | Random sampling, matching |
| Information bias | Measurement error in exposure/outcome | Validated instruments, blinding |
| Recall bias | Differential recall by disease status | Use records, not self-report |
| Confounding | Third variable affects both exposure and outcome | Stratification, regression, matching |
| Lead-time bias | Earlier detection misinterpreted as longer survival | Use mortality, not survival |
| Healthy worker effect | Workers are healthier than general population | Use employed comparison group |
def assess_confounding(crude_rr: float, adjusted_rr: float,
threshold: float = 0.10) -> dict:
"""
Assess whether a variable is a confounder.
"""
pct_change = abs(crude_rr - adjusted_rr) / crude_rr * 100
return {
'crude_RR': crude_rr,
'adjusted_RR': adjusted_rr,
'percent_change': round(pct_change, 1),
'is_confounder': pct_change > threshold * 100,
'interpretation': (
f"{'Confounder detected' if pct_change > threshold * 100 else 'Not a confounder'}: "
f"adjusting changed the RR by {pct_change:.1f}% "
f"(threshold: {threshold*100:.0f}%)"
)
}
For time-to-event data, use Kaplan-Meier estimators for descriptive analysis, log-rank tests for group comparisons, and Cox proportional hazards regression for multivariable analysis. Always check the proportional hazards assumption using Schoenfeld residuals and report median survival times with 95% confidence intervals.
Follow STROBE (observational studies), CONSORT (trials), or RECORD (routinely collected data) reporting guidelines. Report all measures with 95% confidence intervals. Present both crude and adjusted estimates to show the impact of confounding adjustment.