算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
replicate-study【设计与创意】Use when applying a published cohort study's methodology to a different database. Extracts the design from the source paper, maps variables to the target database with a harmonization table, generates the analysis code and reports every forced deviation.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Apply a published study's methodology to a different database and report every place the target database forced a deviation.
${CLAUDE_SKILL_DIR}/references/harmonization_knhanes_nhanes.csv (if KNHANES↔NHANES)${CLAUDE_SKILL_DIR}/references/methodology_extraction_template.md — checklist for extracting study design${CLAUDE_SKILL_DIR}/references/harmonization_knhanes_nhanes.csv — KNHANES↔NHANES variable mapping (67 rows)${CLAUDE_SKILL_DIR}/references/harmonization_3country.csv — KNHANES+NHANES+CHNS 3-country mapping (46 rows)${CLAUDE_SKILL_DIR}/../write-paper/references/paper_types/nhis_cohort.md${CLAUDE_SKILL_DIR}/../write-paper/references/paper_types/cross_national.md${CLAUDE_SKILL_DIR}/../analyze-stats/references/analysis_guides/survey_weighted.md${CLAUDE_SKILL_DIR}/../analyze-stats/references/analysis_guides/propensity_score.mdmethodology_extraction_template.md: study design, database
(name, country, years, N), population (inclusion/exclusion, age range), exposure and outcome
(variable, definition, coding), covariates with definitions, statistical methods (regression
type, adjustment models, subgroup analyses), survey design (weights, strata, PSU), and every
sensitivity analysis./define-variables
to cross-check whether to mirror the legacy definition (pure replication) or upgrade to the
current one (extension). Record the choice in the difference report.domain, concept, concept_en, one variable/label
column set per database such as knhanes_var / nhanes_var, and harmonization_notes).[VERIFY: variable_name] and ask the user to confirm it against the data dictionary;
never guess a variable name, column name or coding.variable_mapping.csv) for user approval.pandas + R via
subprocess for survey-weighted analysis):
a. Data loading & cleaning: read target DB, derive inclusion/exclusion flags (keep every row)
b. Variable derivation: recode variables per mapping table
c. Survey design setup: define svydesign object (strata, PSU, weights) on the full file,
then restrict it with subset(design, <inclusion flag>); deleting rows before the design is
declared gives wrong standard errors (/analyze-stats survey_weighted.md, subpopulation
analysis). Weighted analysis is mandatory for KNHANES/NHANES — never run unweighted
models. Never pool data across surveys; analyze each country's data with its own survey
design.
d. Table 1: demographics by exposure group (weighted)
e. Main analysis: replicate the primary model (logistic/Cox/linear regression)
f. Subgroup analyses: if specified in source paper
g. Sensitivity analyses: replicate all listed in source paper/analyze-stats templates where available (survey_weighted, propensity_score).results/ and the report comes from that
executed output.Save replication_report.md in the working directory, documenting every deviation from the
source methodology:
| Section | Content |
|---|---|
| Study Design | Same / Modified (explain) |
| Database | Source DB → Target DB (N, years, country) |
| Population | Inclusion/exclusion differences |
| Variable Mapping | Full mapping table with match status |
| Unavailable Variables | What's missing and how handled |
| Methodological Differences | Any forced changes (e.g., BMI cutoffs, LDL direct measurement vs Friedewald) |
| Expected Differences | Why results may differ (population, measurement, cultural) |
Note that KNHANES/NHANES are de-identified public data (IRB exempt or waived). Cite only with a
/search-lit-confirmed DOI/PMID; otherwise mark the reference [UNVERIFIED - NEEDS MANUAL CHECK].
Before reporting completion, verify:
{working_dir}/
├── replication_report.md — Structured difference report
├── variable_mapping.csv — Variable mapping table with match status
├── analysis_code.py — Main analysis script (Python + R calls)
├── analysis_code.R — R script for survey-weighted analysis
└── results/
├── table1.csv — Demographics table
├── main_results.csv — Primary analysis results
└── subgroup_results.csv — Subgroup analysis results (if applicable)