Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/aperivue-cross-national/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 2411% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 154% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 164% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 150% | 0% |
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).
harmonization_knhanes_nhanes.csvmedsci-skills/skills/replicate-study/references/harmonization_knhanes_nhanes.csvmedsci-skills/skills/write-paper/references/paper_types/cross_national.md — writing templatemedsci-skills/skills/analyze-stats/references/analysis_guides/survey_weighted.mdKNHANES (single CSV):
NHANES (multiple CSVs):
For EACH country independently:
Generate a side-by-side comparison:
| Analysis | Korea wOR (95% CI) | US wOR (95% CI) | Direction Agreement | |----------|-------------------|-----------------|---------------------| | Overall (fully adjusted) | ... | ... | ✓/✗ | | Male | ... | ... | | | Female | ... | ... | | | ... | ... | ... | |
{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| 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 |
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 |
| 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 |
| Variable | Raw Var | Coding | |----------|---------|--------| | Asthma | MCQ010 | "Yes" / "No" (ever told by doctor) | | Sleep hours | SLD012 | Numeric (hours/night on weekdays) | | BP treatment | BPQ020 | "Yes" / "No" (told by doctor, high BP) | | Cholesterol treatment | BPQ100D | "Yes" / "No" (taking cholesterol Rx) | | PA vigorous work | PAQ605/PAQ610/PAD615 | Yes/No, days/week, min/day | | PA moderate work | PAQ620/PAQ625/PAD630 | Yes/No, days/week, min/day | | PA walk/bike | PAQ635/PAQ640/PAD645 | Yes/No, days/week, min/day | | PA vigorous rec | PAQ665/PAQ670/PAD675 | Yes/No, days/week, min/day | | PA moderate rec | PAQ650/PAQ655/PAD660 | Yes/No, days/week, min/day | | Dietary fiber | DR1TFIBE (DR1TOT_J) | Numeric (grams, day 1 recall) | | Dietary sodium | DR1TSODI (DR1TOT_J) | Numeric (mg) | | Dietary sat fat | DR1TSFAT (DR1TOT_J) | Numeric (grams) | | Total energy | DR1TKCAL (DR1TOT_J) | Numeric (kcal) | | Total sugars | DR1TSUGR (DR1TOT_J) | Numeric (grams) | | Non-HDL chol | LBXTC - LBDHDD | Derived: TCHOL_J minus HDL_J |
Data source: cpc.unc.edu/projects/china (free registration) Biomarker wave: 2009 only (N=9,549). Other variables available 1989-2015. Survey design: No formal weights. Use svydesign(id=~COMMID, weights=~1) or cluster-robust SE.
| File | Key Variables | Join Key | |------|--------------|----------| | mast_pub_12 | IDind, GENDER (1=M/2=F), WEST_DOB_Y (birth year) | IDind | | pexam_00 | HEIGHT, WEIGHT, U10 (waist), SYSTOL1-3, DIASTOL1-3, U22 (HBP dx), U24 (HBP meds), U24A (DM dx), U25 (ever smoked), U27 (still smokes), U40 (alcohol), U41 (freq), U48A (self-health), COMMID | IDind + filter WAVE==2009 | | biomarker_09 | GLUCOSE_MG, HbA1c, TC_MG, TG_MG, HDL_C_MG, LDL_C_MG, HS_CRP, HGB, WBC, ALT, CRE_MG | IDind | | educ_12 | A12 (education 0-6) | IDind + filter WAVE==2009 | | indinc_10 | indwage (yuan, continuous → quartiles) | IDind + filter wave==2009 |
| Variable | Raw Var | Coding | Notes | |----------|---------|--------|-------| | Sex | GENDER | 1=Male, 2=Female | Same as KNHANES/NHANES | | Age | WEST_DOB_Y | age = wave_year - WEST_DOB_Y | Integer truncation | | BMI | HEIGHT, WEIGHT | WEIGHT / (HEIGHT/100)^2 | Obesity: BMI ≥ 28 (WGOC, NOT 25 or 30) | | Waist | U10 | cm, direct measurement | Central obesity: ≥90M / ≥80F (IDF-Asian) | | SBP | SYSTOL1-3 | mean(SYSTOL1, SYSTOL2, SYSTOL3) | 3 readings averaged | | DBP | DIASTOL1-3 | mean(DIASTOL1, DIASTOL2, DIASTOL3) | 3 readings averaged | | HBP diagnosed | U22 | 0=No, 1=Yes, 9=Don't know (→NA) | | | HBP medication | U24 | 0=No, 1=Yes | | | DM diagnosed | U24A | 0=No, 1=Yes, 9=Don't know (→NA) | | | Smoking | U25 + U27 | never(U25==0) / former(U25==1 & U27==0) / current(U25==1 & U27==1) | | | Alcohol | U40 + U41 | never(U40==0) / occasional(U41≥4) / frequent(U41≤3, ≥1x/week) | U41: 1=daily, 2=3-4x/wk, 3=1-2x/wk, 4=1-2x/mo, 5=<1x/mo | | Education | A12 | 0=none, 1=primary, 2=lower-mid, 3=upper-mid, 4=technical, 5=university, 6=master+. Recode: 0-2→low, 3-4→mid, 5-6→high | | | Income | indwage | Continuous yuan → quartiles within wave | | | Glucose | GLUCOSE_MG | mg/dL (also GLUCOSE in mmol/L) | 2009 only | | HbA1c | HbA1c | % (direct) | 2009 only | | TC | TC_MG | mg/dL | 2009 only | | TG | TG_MG | mg/dL | 2009 only | | HDL | HDL_C_MG | mg/dL | 2009 only | | hsCRP | HS_CRP | mg/L | 2009 only | | Hemoglobin | HGB | g/L (divide by 10 for g/dL) | Unit differs from KR/US | | Self-health | U48A | Self-reported health status | 2004-2011 | | Depression | — | NOT AVAILABLE in standard download. CES-D exists but needs separate dataset. | Cannot directly compare with PHQ-9 |
wake_time - bed_time with midnight crossing.[VERIFY: variable_name] and ask the user to confirm against the data dictionary./search-lit for all citations.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 5,579 | 25,699 | +361% | 1 | 1 | 0% | 448 | 11,250 | +2411% | 0 | 0 | — |
case-02 | fail→fail | 3,756 | 26,263 | +599% | 1 | 1 | 0% | 270 | 11,217 | +4054% | 0 | 0 | — |
case-03 | fail→pass | 27,640 | 32,128 | +16% | 1 | 1 | 0% | 6,275 | 11,222 | +79% | 0 | 0 | — |
case-04 | pass→pass | 14,154 | 13,446 | -5% | 1 | 1 | 0% | 3,113 | 7,877 | +153% | 0 | 0 | — |
case-05 | pass→pass | 13,926 | 15,373 | +10% | 1 | 1 | 0% | 3,012 | 8,019 | +166% | 0 | 0 | — |
case-06 | pass→pass | 17,777 | 10,920 | -39% | 1 | 1 | 0% | 3,917 | 7,174 | +83% | 0 | 0 | — |
case-07 | fail→pass | 10,784 | 3,645 | -66% | 1 | 1 | 0% | 2,223 | 5,646 | +154% | 0 | 0 | — |
case-08 | pass→pass | 14,134 | 11,967 | -15% | 1 | 1 | 0% | 2,393 | 7,206 | +201% | 0 | 0 | — |
case-09 | fail→pass | 12,396 | 7,203 | -42% | 1 | 1 | 0% | 2,280 | 6,016 | +164% | 0 | 0 | — |
case-10 | pass→pass | 13,503 | 7,842 | -42% | 1 | 1 | 0% | 2,741 | 6,418 | +134% | 0 | 0 | — |
case-11 | fail→pass | 17,795 | 16,502 | -7% | 1 | 1 | 0% | 3,141 | 7,843 | +150% | 0 | 0 | — |
case-12 | pass→pass | 10,741 | 6,262 | -42% | 1 | 1 | 0% | 1,908 | 6,160 | +223% | 0 | 0 | — |
case-13 | fail→pass | 12,501 | 9,711 | -22% | 1 | 1 | 0% | 2,487 | 6,857 | +176% | 0 | 0 | — |
case-14 | pass→pass | 8,444 | 6,089 | -28% | 1 | 1 | 0% | 1,363 | 5,974 | +338% | 0 | 0 | — |
case-15 | pass→pass | 9,649 | 5,887 | -39% | 1 | 1 | 0% | 1,684 | 6,100 | +262% | 0 | 0 | — |
case-16 | fail→pass | 13,290 | 4,189 | -68% | 1 | 1 | 0% | 2,597 | 5,754 | +122% | 0 | 0 | — |
case-17 | pass→pass | 10,120 | 9,229 | -9% | 1 | 1 | 0% | 1,963 | 6,684 | +240% | 0 | 0 | — |
case-18 | pass→pass | 10,890 | 5,831 | -46% | 1 | 1 | 0% | 1,893 | 5,989 | +216% | 0 | 0 | — |
case-19 | fail→pass | 12,746 | 8,625 | -32% | 1 | 1 | 0% | 2,144 | 6,609 | +208% | 0 | 0 | — |
case-20 | pass→pass | 17,985 | 12,064 | -33% | 1 | 1 | 0% | 2,974 | 7,214 | +143% | 0 | 0 | — |
case-21 | fail→pass | 9,930 | 6,005 | -40% | 1 | 1 | 0% | 1,800 | 5,923 | +229% | 0 | 0 | — |
case-22 | fail→pass | 17,223 | 18,965 | +10% | 1 | 1 | 0% | 3,053 | 8,653 | +183% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +45 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.