Blog

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

เปิดใช้งาน Uniqcret Research Suite แล้ว — หกแอปวิจัย ล็อกอินเดียว
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

เปิดใช้งาน Uniqcret Research Suite แล้ว — หกแอปวิจัย ล็อกอินเดียว

แอปพลิเคชันวิจัยเต็มรูปแบบหกตัวเปิดใช้งานแล้วที่ webapps.uniqcret.com: Stat Prep Toolkit, Randomizer, Causal DAG Builder, Sample Size Studio, Missing Data Advisor และ Meta-Analysis Studio สองตัวในนั้นรัน R ตัวจริงในเบราว์เซอร์ผ่าน webR — ข้อมูลของคุณไม่ออกจากเครื่อง — และตอนนี้แชตขับแอปเหล่านี้ให้คุณได้แล้ว

ไทย10 Aug 2026· 6 min read
The Uniqcret Research Suite Is Live — Six Research Apps, One Sign-In
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

The Uniqcret Research Suite Is Live — Six Research Apps, One Sign-In

Six full research applications are now live at webapps.uniqcret.com: Stat Prep Toolkit, Randomizer, Causal DAG Builder, Sample Size Studio, Missing Data Advisor and Meta-Analysis Studio. Two of them run genuine R inside your browser via webR — your data never leaves your machine — and the chat can now drive them for you.

EN10 Aug 2026· 6 min read
หนึ่งค่าต่อหนึ่งคน: คู่มืออ่านซีรีส์ Mixed Model ฉบับเข้าใจง่ายสำหรับแพทย์
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

หนึ่งค่าต่อหนึ่งคน: คู่มืออ่านซีรีส์ Mixed Model ฉบับเข้าใจง่ายสำหรับแพทย์

การวัดซ้ำในคนเดียวกันทำให้ ordinary regression ใช้ไม่ได้ และมีแนวคิดเดียวที่แก้ปัญหานี้ คือผู้ป่วยแต่ละคนพก "ค่าประจำตัว" ของตัวเองเข้าไปในทุกแถวที่เขาให้ข้อมูล คู่มือนี้เล่าซีรีส์ mixed model ทั้งแปดตอนเป็นเรื่องเดียวด้วยภาษาที่เข้าใจง่าย รวมถึงเหตุผลว่าทำไมโมเดลที่สมดุลจึงรายงาน standard error เท่ากันทุกตำแหน่งอย่างซื่อสัตย์

ไทย8 Aug 2026· 8 min read
One Number Per Person: A Plain-Language Guide to the Whole Mixed-Models Series
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

One Number Per Person: A Plain-Language Guide to the Whole Mixed-Models Series

Repeated measurements from the same patient break ordinary regression, and one idea fixes it: every patient carries their own number into every row they contribute. This guide tells the whole eight-post mixed-models series as one plain-language story, including why a balanced model honestly reports the same standard error at every site.

EN8 Aug 2026· 8 min read
SE เท่ากันสี่ค่า: วิธีปกป้อง mixed model ต่อหน้าอาจารย์
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

SE เท่ากันสี่ค่า: วิธีปกป้อง mixed model ต่อหน้าอาจารย์

SE ที่เท่ากันสี่ค่าไม่ได้แปลว่าโปรแกรมก๊อปตัวเลขซ้ำ ภายใต้ดีไซน์ที่สมดุลและ residual variance ค่าเดียว SE ที่เท่ากันคือสิ่งที่พีชคณิตบังคับให้เป็น คำถามจริงคือ pooled variance ตัวนั้นมีเหตุผลรองรับหรือไม่ต่างหาก

ไทย8 Aug 2026· 13 min read
Four Identical Standard Errors: Defending a Mixed Model in Front of Your Professor
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

Four Identical Standard Errors: Defending a Mixed Model in Front of Your Professor

Four identical standard errors are not a sign that the software duplicated a number. Under a balanced design with one pooled residual variance, identical standard errors are what the algebra requires — the real question is whether that pooled variance was ever defensible.

EN8 Aug 2026· 13 min read
ทางเลือกแบบ Population-Averaged: GLS, GEE และจุดที่โชคของ linear model หมดลง
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

ทางเลือกแบบ Population-Averaged: GLS, GEE และจุดที่โชคของ linear model หมดลง

Marginal model ปฏิเสธที่จะอธิบายว่า correlation มาจากไหน มันแค่บอกตรง ๆ ว่า correlation เป็นเท่าไร สำหรับ outcome ต่อเนื่องแทบไม่ต้องจ่ายอะไรเลย แต่สำหรับ outcome แบบ binary มันเปลี่ยนค่า odds ratio เลยทีเดียว

ไทย8 Aug 2026· 11 min read
Population-Averaged Alternatives: GLS, GEE, and Where the Linear Model's Luck Runs Out
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

Population-Averaged Alternatives: GLS, GEE, and Where the Linear Model's Luck Runs Out

A marginal model refuses to explain where the correlation came from; it simply states what the correlation is. For a continuous outcome that costs you almost nothing — for a binary outcome it changes the odds ratio itself.

EN8 Aug 2026· 11 min read
เมื่อ Compound Symmetry ไม่จริง: variance ไม่เท่ากัน, unstructured correlation และเพดาน identifiability
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

เมื่อ Compound Symmetry ไม่จริง: variance ไม่เท่ากัน, unstructured correlation และเพดาน identifiability

ภายใต้ random intercept ทุกคู่ของการวัดแชร์ covariance ค่าเดียวกันเป๊ะ แต่ถ้า residual variance ของแต่ละตำแหน่งไม่เท่ากัน correlation จะไม่เท่ากัน compound symmetry จึงเป็นสมมติฐานเรื่องสองอย่าง ไม่ใช่อย่างเดียว

ไทย8 Aug 2026· 12 min read
When Compound Symmetry Is a Lie: Unequal Variances, Unstructured Correlation, and the Identifiability Ceiling
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

When Compound Symmetry Is a Lie: Unequal Variances, Unstructured Correlation, and the Identifiability Ceiling

Under a random intercept, every pair of measurements shares exactly the same covariance — but if the residual variances differ by site, the correlations do not. Compound symmetry is an assumption about two things, not one.

EN8 Aug 2026· 12 min read
Random Slope: เมื่อแต่ละคนพก "เส้นทาง" ของตัวเองมาด้วย
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Random Slope: เมื่อแต่ละคนพก "เส้นทาง" ของตัวเองมาด้วย

Random intercept บอกว่าแต่ละคนอยู่สูงหรือต่ำกว่าค่าเฉลี่ย ส่วน random slope บอกว่าแต่ละคนยังเปลี่ยนแปลงด้วยอัตราของตัวเองด้วย และทันทีที่คุณอนุญาตให้มันเกิด variance ก็จะไม่คงที่ตามเวลาอีกต่อไป

ไทย8 Aug 2026· 11 min read
Random Slopes: When Each Person Carries a Trajectory
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Random Slopes: When Each Person Carries a Trajectory

A random intercept says each person sits higher or lower. A random slope says each person also moves at their own rate — and the moment you allow it, the variance stops being constant over time.

EN8 Aug 2026· 11 min read
V = ZGZ′ + R: สมการเดียวที่อยู่เบื้องหลัง mixed model ทุกตัว
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

V = ZGZ′ + R: สมการเดียวที่อยู่เบื้องหลัง mixed model ทุกตัว

linear mixed model ทุกตัว ไม่ว่าซับซ้อนแค่ไหน ยุบลงเหลือบรรทัดเดียว: marginal covariance คือ ZGZ′ บวก R และทุกอย่างที่คุณจะแก้ในโมเดล ล้วนแก้ที่หนึ่งในสองก้อนนี้

ไทย8 Aug 2026· 10 min read
V = ZGZ′ + R: The One Equation Behind Every Mixed Model
Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges

V = ZGZ′ + R: The One Equation Behind Every Mixed Model

Every linear mixed model, however complicated, collapses into one line: the marginal covariance is ZGZ′ plus R. Everything you will ever change about the model changes exactly one of those two terms.

EN8 Aug 2026· 10 min read
Conditional หรือ Marginal? สองคำถามในโมเดลเดียว
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Conditional หรือ Marginal? สองคำถามในโมเดลเดียว

เมื่อ condition บนตัวคนแล้ว การวัดทั้งสี่จุดเป็นอิสระต่อกัน แต่ในระดับ marginal มัน correlate กันที่ 0.625 ทั้งสองประโยคมาจากโมเดลตัวเดียวกัน เพราะมันตอบคนละคำถาม

ไทย8 Aug 2026· 12 min read
Conditional or Marginal? Two Questions, One Mixed Model
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Conditional or Marginal? Two Questions, One Mixed Model

Conditional on the person, the four measurements are independent; marginally, they correlate at 0.625. Both statements come from the same fitted model, because they answer two different questions.

EN8 Aug 2026· 12 min read
Compound Symmetry กับ ICC: ออฟเซ็ตเดียว correlation เดียว
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Compound Symmetry กับ ICC: ออฟเซ็ตเดียว correlation เดียว

ให้ทุกคนมีออฟเซ็ตร่วมหนึ่งค่า แล้ว covariance matrix จะเขียนตัวมันเองออกมา: variance เท่ากันบนเส้นทแยงมุม และ covariance เท่ากันนอกเส้นทแยงมุม อัตราส่วนระหว่างสองค่านี้มีชื่อว่า intraclass correlation

ไทย8 Aug 2026· 10 min read
Compound Symmetry and the ICC: One Offset, One Correlation
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

Compound Symmetry and the ICC: One Offset, One Correlation

Give every person one shared offset and the covariance matrix writes itself: identical variances on the diagonal, identical covariances off it. The ratio between them has a name — the intraclass correlation.

EN8 Aug 2026· 10 min read
ค่าชดเชยส่วนตัวที่ถูกแชร์: Random Intercept คืออะไรกันแน่
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

ค่าชดเชยส่วนตัวที่ถูกแชร์: Random Intercept คืออะไรกันแน่

Random intercept ไม่ใช่จุดตัดแกน Y ที่สุ่มมา แต่คือค่าเดียวต่อหนึ่งคน ที่ถูกใส่ซ้ำแบบไม่เปลี่ยนแปลงในทุกแถวของคนคนนั้น และเพราะมันถูกแชร์ ทุกแถวจึงเลิกเป็นอิสระต่อกัน

ไทย8 Aug 2026· 9 min read
The Shared Offset: What a Random Intercept Really Is
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

The Shared Offset: What a Random Intercept Really Is

A random intercept is not a randomly placed y-axis crossing. It is one number per person, reused unchanged in every row that person contributes — and because it is shared, the rows stop being independent.

EN8 Aug 2026· 9 min read
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
Blog — Uniqcret