Receber por email
← Voltar para o catálogo

cross-national

End-to-end cross-national comparison study using KNHANES + NHANES + CHNS (or other parallel surveys). Variable harmonization, parallel weighted analysis, and comparison tables. Supports 2-country (KR+US) and 3-country (KR+US+CN) designs.

156estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: NOASSERTION

Como adicionar

/plugin marketplace add Aperivue/medsci-skills

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/cross-national/svg)](https://www.skillteca.com.br/skills/cross-national)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Cross-National Comparison Study Skill

You are assisting a medical researcher in conducting a cross-national comparison study using parallel nationally representative surveys (e.g., KNHANES for Korea, NHANES for the US, CHNS for China).

When to Use

  • Researcher has a clinical question to compare across two countries
  • KNHANES + NHANES data available (or other parallel survey pairs)
  • Goal: produce a complete analysis with country-stratified results + comparison table

Inputs

  1. Research question: exposure → outcome association to compare across countries
  2. Korean data path: KNHANES CSV file
  3. US data path: NHANES CSV directory (multiple tables to merge)
  4. Harmonization table (optional): CSV mapping variables across surveys
  5. Default: replicate-study skill's harmonization_knhanes_nhanes.csv

Reference Files

  • Harmonization table: medsci-skills/skills/replicate-study/references/harmonization_knhanes_nhanes.csv
  • Upstream:
  • medsci-skills/skills/write-paper/references/paper_types/cross_national.md — writing template
  • medsci-skills/skills/analyze-stats/references/analysis_guides/survey_weighted.md

Workflow

Phase 1: Study Definition

  1. Confirm research question: Exposure → Outcome
  2. Define variable coding for both countries:
  3. Exposure: PHQ-9, BMI category, smoking, etc.
  4. Outcome: diabetes, hypertension, mortality, etc.
  5. Covariates: age, sex, education, income, smoking, alcohol, obesity, CVD
  6. Check harmonization table for variable availability
  7. Output: study protocol summary for user approval

Phase 2: Data Preparation

KNHANES (single CSV):

  1. Load CSV, filter age ≥20 (or per protocol)
  2. Derive variables using KNHANES coding:
  3. Smoking: BS3_1 (1,2=current, 3=former, 8=never)
  4. Alcohol: BD1_11 (2-6=frequent, 1=occasional, 8=never)
  5. Obesity: HE_obe (≥4=obesity for BMI≥25 Asian cutoff)
  6. PHQ-9: BP_PHQ_1~9, sum score, ≥10=depression
  7. Diabetes: HE_glu≥126 | HE_HbA1c≥6.5 | DE1_dg=1
  8. CVD: DI4_dg=1 | DI5_dg=1 | DI6_dg=1
  9. Set survey design: svydesign(id=~psu, strata=~kstrata, weights=~wt_itvex, nest=TRUE)

NHANES (multiple CSVs):

  1. Load and merge tables by SEQN (DEMO_J, DPQ_J, GHB_J, BIOPRO_J, BMX_J, SMQ_J, ALQ_J, DIQ_J, MCQ_J, BPQ_J)
  2. Derive variables using NHANES coding:
  3. Smoking: SMQ020 + SMQ040 (100 cigs + now smoke)
  4. Alcohol: ALQ121 (past 12 mo frequency → categories)
  5. Obesity: BMXBMI ≥30 (WHO cutoff, NOT Asian)
  6. PHQ-9: DPQ010~DPQ090, sum score, ≥10=depression
  7. Diabetes: LBXSGL≥126 | LBXGH≥6.5 | DIQ010=="Yes" (CRITICAL: LBXSGL not LBXSGLU)
  8. CVD: MCQ160B=="Yes" (CHF) | MCQ160C=="Yes" (CHD) | MCQ160D=="Yes" (angina) | MCQ160E=="Yes" (MI)
  9. HTN: BPXOSY3≥140 | BPXODI3≥90 | BPQ020=="Yes"
  10. Set survey design: svydesign(id=~SDMVPSU, strata=~SDMVSTRA, weights=~WTMECPRP, nest=TRUE)

Phase 3: Parallel Analysis

For EACH country independently:

  1. Table 1: Baseline characteristics by exposure (weighted counts + percentages)
  2. Main analysis: Sequential logistic regression models
  3. Model 1 (unadjusted)
  4. Model 2 (age + sex)
  5. Model 3 (fully adjusted: + education, income, smoking, alcohol, obesity, CVD)
  6. Subgroup analyses: By sex, age group, education, income, alcohol, smoking, CVD, obesity
  7. Dose-response (if applicable): RCS with 3 knots

Phase 4: Cross-National Comparison Table

Generate a side-by-side comparison:

| Analysis | Korea wOR (95% CI) | US wOR (95% CI) | Direction Agreement | |----------|-------------------|-----------------|---------------------| | Overall (fully adjusted) | ... | ... | ✓/✗ | | Male | ... | ... | | | Female | ... | ... | | | ... | ... | ... | |

Phase 5: Output Files

{working_dir}/
├── cross_national_report.md    — Study summary + comparison tables
├── variable_mapping.csv        — Variable mapping with match status
├── analysis_korea.R            — KNHANES analysis (self-contained)
├── analysis_us.R               — NHANES analysis (self-contained)
├── results/
│   ├── table1_korea.csv
│   ├── table1_us.csv
│   ├── main_results_comparison.csv
│   └── subgroup_comparison.csv
└── manuscript_draft/           — Optional: Methods + Results draft
    ├── methods_draft.md
    └── results_draft.md

Critical Rules

  1. NEVER pool data across countries. Each country analyzed with its own survey design.
  2. Country-specific BMI cutoffs: Korea ≥25 (Asian), US ≥30 (WHO).
  3. Country-specific income: KNHANES quartile, NHANES PIR → harmonize to binary.
  4. Weighted analysis mandatory: Both KNHANES and NHANES are complex surveys.
  5. Document all harmonization decisions: What matches, what needed recoding, what differs.
  6. Same analytic approach: Identical model specifications for both countries for fair comparison.

KNHANES Variable Coding Reference (validated via Joo 2026 replication)

| Variable | Raw Var | Coding | |----------|---------|--------| | Smoking | BS3_1 | 1,2=Current; 3=Former; 8=Never | | Alcohol | BD1_11 | 2-6=Frequent (current drinker); 1=Occasional (past-year abstainer); 8=Never | | Obesity | HE_obe | 1-3=Normal; 4-6=Obesity (BMI≥25) | | Depression | BP_PHQ_1~9 | Sum ≥10 = depression | | Diabetes | HE_glu, HE_HbA1c, DE1_dg | FPG≥126 or HbA1c≥6.5 or DE1_dg=1 | | CVD | DI4_dg, DI5_dg, DI6_dg | Any = 1 → CVD yes | | Education | edu | 1-3=Non-college; 4=College | | Income | incm | 1-3=Bottom 80%; 4=Top 20% | | Survey design | kstrata, psu, wt_itvex | strata, cluster, weight |

NHANES Variable Coding Reference (validated via Joo 2026 cross-national)

CRITICAL: NHANES data downloaded via R nhanesA package uses TEXT LABELS, not numeric codes.

| Variable | Raw Var | Text Labels → Numeric | |----------|---------|----------------------| | PHQ-9 items | DPQ010~DPQ090 | "Not at all"→0, "Several days"→1, "More than half the days"→2, "Nearly every day"→3 | | Sex | RIAGENDR | "Male" / "Female" (NOT 1/2) | | Smoking (100 cigs) | SMQ020 | "Yes" / "No" | | Smoking (now) | SMQ040 | "Every day" / "Some days" / "Not at all" | | Alcohol freq | ALQ121 | Text labels (see below) | | Alcohol ever | ALQ111 | "Yes" / "No" | | Education | DMDEDUC2 | 5 text levels (see SKILL.md Phase 2) | | Diabetes dx | DIQ010 | "Yes" / "No" / "Borderline" | | CVD (CHF) | MCQ160B | "Yes" / "No" / "Don't know" | | CVD (CHD) | MCQ160C | "Yes" / "No" / "Don't know" | | CVD (angina) | MCQ160D | "Yes" / "No" / "Don't know" | | Fasting glucose | LBXSGL (BIOPRO_J) | Numeric (mg/dL) — note: NOT LBXSGLU | | HbA1c | LBXGH (GHB_J) | Numeric (%) | | BMI | BMXBMI (BMX_J) | Numeric (kg/m²) | | Weight | WTMEC2YR (single-cycle) or WTMECPRP (pre-pandemic pooled) | Numeric | | Strata | SDMVSTRA | Numeric | | PSU | SDMVPSU | Numeric |

ALQ121 Text Label Mapping (Alcohol Frequency)

  • Frequent (current drinker): Any specific frequency except "Never in the last year"
  • Occasional (past-year abstainer): "Never in the last year"
  • Never (lifetime non-drinker): ALQ111 == "No" (ALQ121 will be NA)

Additional KNHANES Variables (validated via LE8-Asthma replication)

| Variable | Raw Var | Coding | |----------|---------|--------| | Asthma | DJ2_dg | 0=No, 1=Yes (physician dx), 9=Don't know → exclude | | Asthma treatment | DJ2_pt | 0=No, 1=Yes, 8=N/A, 9=Don't know | | Sleep (2017-18) | BP16_11/12/13/14 | Clock times, NOT hours! 11=bed hour, 12=bed min, 13=wake hour, 14=wake min. Calculate: duration = wake_time - bed_time (handle midnight crossing). 99=Don't know→NA | | Sleep (2017-18 weekend) | BP16_21/22/23/24 | Same format as weekday | | Sleep (2019-20) | BP16_1/2 | Direct sleep hours (weekday/weekend). 99=Don't know→NA | | PA aerobic | pa_aerobic | 0=Doesn't meet, 1=Meets guidelines. Note: values are 0/1, NOT 1/2 | | HTN treatment | DI1_pr | 1=Yes, 0=No (currently treating hypertension) | | Dyslipidemia tx | DI3_pr | 1=Yes, 0=No (if available) | | Non-HDL chol | HE_chol - HE_HDL_st2 | Derived: total cholesterol minus HDL |

Additional NHANES Variables (validated

Compartilhar X LinkedIn