Blog

1031 posts on clinical medicine, epidemiology, research methodology, statistics and code — in English and Thai. Filter by category and language, or search.

Joint Model กับ Stacking: รวมคำตอบ vs รวมกระบวนการ
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Joint Model กับ Stacking: รวมคำตอบ vs รวมกระบวนการ

Stacking รวม predictions ของหลายโมเดลเพื่อทำนาย outcome เดียว ส่วน joint model ประมาณหลายกระบวนการที่สัมพันธ์กันไปพร้อมกัน หลาย component เหมือนกัน แต่เหตุผลต่างกัน

ไทย19 Jul 2026· 7 min read
Joint Model vs Stacking: Combining Answers vs Combining Processes
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Joint Model vs Stacking: Combining Answers vs Combining Processes

Stacking combines the predictions of many models for one outcome; a joint model estimates several related processes together. Same 'many components', very different reasons.

EN19 Jul 2026· 7 min read
Joint Model: หนึ่ง Likelihood สำหรับสองกระบวนการ
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Joint Model: หนึ่ง Likelihood สำหรับสองกระบวนการ

Joint model ประมาณ biomarker ที่วัดซ้ำและ time-to-event ไปพร้อมกันใน likelihood เดียว เชื่อมด้วย latent trajectory ร่วม ไม่ใช่สองขั้นตอนแยกกัน

ไทย19 Jul 2026· 9 min read
Joint Models: One Likelihood for Two Processes
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Joint Models: One Likelihood for Two Processes

A joint model estimates a repeated biomarker and a time-to-event outcome together in one likelihood, linked by a shared latent trajectory — not two separate stages.

EN19 Jul 2026· 9 min read
Recalibration in Practice: Intercept, Slope และ Validation ที่ซื่อตรง
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Recalibration in Practice: Intercept, Slope และ Validation ที่ซื่อตรง

รวม intercept และ slope เข้าด้วยกัน — logit(p)=A+B·LP — ดูว่ามันพับกลับเข้าไปเป็นสัมประสิทธิ์ที่ปรับใหม่อย่างไร และทำไมต้องใช้ bootstrap หรือ cross-validation เพื่อการแก้ที่ซื่อตรง ปิดซีรีส์แบบสองภาษาและโต้ตอบ พร้อมตัวอย่างคำนวณจาก 81.8% เป็น 65.7%

ไทย19 Jul 2026· 11 min read
Recalibration in Practice: Intercept, Slope & Honest Validation
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Recalibration in Practice: Intercept, Slope & Honest Validation

Put the intercept and slope together — logit(p)=A+B·LP — see how they fold back into updated coefficients, and why bootstrap or cross-validation is needed for an honest correction. A bilingual, interactive close to the series, including the worked example from 81.8% to 65.7%.

EN19 Jul 2026· 11 min read
Calibration Slope: Overfitting, ความสุดโต่ง และ Shrinkage
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Calibration Slope: Overfitting, ความสุดโต่ง และ Shrinkage

เมื่อการทำนายสุดโต่งเกินไป — ความเสี่ยงสูงสูงเกิน ความเสี่ยงต่ำต่ำเกิน — calibration slope จะต่ำกว่า 1 ซึ่งเป็นลายนิ้วมือของ overfitting บทความโต้ตอบสองภาษานี้แสดงวิธีประเมิน slope B และการทำ shrinkage ที่หมุนเส้น calibration กลับมาแนบเส้นทแยง พร้อม R และ Python

ไทย19 Jul 2026· 9 min read
The Calibration Slope: Overfitting, Extremeness & Shrinkage
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

The Calibration Slope: Overfitting, Extremeness & Shrinkage

When predictions are too extreme — high risks too high, low risks too low — the calibration slope is below 1, the fingerprint of overfitting. This interactive, bilingual walkthrough shows how the slope B is estimated and how shrinkage rotates the calibration curve back onto the diagonal, with R and Python side by side.

EN19 Jul 2026· 9 min read
Calibration in the Large และ Calibration Intercept
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Calibration in the Large และ Calibration Intercept

โมเดลทำนายอาจจัดลำดับผู้ป่วยได้สมบูรณ์แต่ยังบอกระดับความเสี่ยงโดยรวมผิด รู้จัก calibration in the large, calibration intercept A และ intercept-only recalibration พร้อมกราฟโต้ตอบและ terminal R/Python ทีละบรรทัดที่ดึงเส้น calibration กลับมาแนบเส้นทแยง

ไทย19 Jul 2026· 9 min read
Calibration in the Large & the Calibration Intercept
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Calibration in the Large & the Calibration Intercept

A prediction model can rank patients perfectly and still get the overall risk level wrong. Meet calibration in the large, the calibration intercept A, and intercept-only recalibration — with an interactive plot and a line-by-line R/Python terminal that lift the calibration curve back onto the diagonal.

EN19 Jul 2026· 9 min read
U
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Cross-Sectional Analogue Designs: Population-Analogue, Cohort-Analogue & Case-Control-Analogue Sampling for Rare Exposure vs Rare Outcome

Cross-sectional studies can be categorised by how the sample is drawn, each an analogue of another primary design. Use a population-analogue design when the predictor (X) and outcome (Y) are both common; a cohort-analogue design (sampled by exposure) when X is rare; and a case-control-analogue design (sampled by outcome) when Y is rare.

EN11 Jul 2026· 6 min read
อคติจากตัวแปรกวน → Propensity score → Matching: พิมพ์ตามในเทอร์มินัล
Clinical Epidemiology ResearchUniqcret doctor knowledgesData Analytics or Statistics

อคติจากตัวแปรกวน → Propensity score → Matching: พิมพ์ตามในเทอร์มินัล

ดู propensity-score matching รันทีละบรรทัดในเทอร์มินัล R/Python บนข้อมูลจำลอง 600 คน การเทียบแบบดิบให้ผลผิดทิศ (+3.88 วัน) ส่วนการจับคู่ด้วยคะแนนดึงค่ากลับมาใกล้ความจริงที่ฝังไว้ −3.0 วัน (−2.93 ใน R, −3.10 ใน Python) พร้อมมองอย่างซื่อสัตย์ว่าข้อมูลจำลองพิสูจน์อะไรได้และพิสูจน์อะไรไม่ได้

ไทย8 Jul 2026· 8 min read
Confounding → Propensity Score → Matching, in a Terminal
Clinical Epidemiology ResearchUniqcret doctor knowledgesData Analytics or Statistics

Confounding → Propensity Score → Matching, in a Terminal

Watch propensity-score matching run line by line in an embedded R/Python terminal on a simulated 600-patient cohort. A raw comparison gets the wrong sign (+3.88 days); matching on the score recovers the built-in truth of −3.0 days (−2.93 in R, −3.10 in Python) — with an honest look at what a simulation can and cannot prove.

EN8 Jul 2026· 8 min read
จับคู่ด้วย Propensity score แบบเห็นทุกขั้น: ทั้งกลุ่มรักษาและ case-control
Clinical Epidemiology ResearchUniqcret doctor knowledgesData Analytics or Statistics

จับคู่ด้วย Propensity score แบบเห็นทุกขั้น: ทั้งกลุ่มรักษาและ case-control

เรียน propensity score matching ทีละบรรทัดบนข้อมูลจำลอง 400 คน สร้างคะแนน ดู overlap จับคู่ nearest-neighbour และตรวจ balance ทั้งแบบทำเองและด้วย MatchIt แล้วดูว่าเครื่องเดียวกันใช้ได้ทั้งแบบกลุ่มรักษาเทียบกลุ่มควบคุม (ATT) และแบบ case-control (odds ratio)

ไทย8 Jul 2026· 11 min read
Propensity Score for Matching, Step by Step: Treatment vs Control and Case-Control
Clinical Epidemiology ResearchUniqcret doctor knowledgesData Analytics or Statistics

Propensity Score for Matching, Step by Step: Treatment vs Control and Case-Control

Propensity-score matching, taught line by line on a simulated 400-patient cohort. Fit the score, check overlap, match nearest-neighbour, and re-check balance by hand and with MatchIt - then see how the same machine serves both treatment-vs-control (ATT) and case-control (odds ratio) designs.

EN8 Jul 2026· 11 min read
Continuous Agreement: ICC, SEM, SDC และ Bland–Altman
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Continuous Agreement: ICC, SEM, SDC และ Bland–Altman

การเลือก ICC (model × definition × type, Shrout-Fleiss) พร้อมตัวเลข worked จาก Stata และ SEM, SDC (worked 12.5), CV และ Bland–Altman plot

ไทย21 Jun 2026
Continuous Agreement: ICC, SEM, SDC, and Bland–Altman
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Continuous Agreement: ICC, SEM, SDC, and Bland–Altman

Choosing the ICC (model × definition × type, Shrout-Fleiss), with Stata worked numbers, plus SEM, SDC (worked 12.5), CV and the Bland–Altman plot.

EN21 Jun 2026
Categorical Agreement: % Agreement, Specific Agreement และ Kappa
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Categorical Agreement: % Agreement, Specific Agreement และ Kappa

% agreement, specific agreement และ Cohen's kappa ที่ปรับแก้ความบังเอิญ (worked κ=0.70) พร้อม linear vs quadratic weighted kappa (worked κ_w=0.64)

ไทย21 Jun 2026
Blog — Uniqcret