Blog

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

การศึกษา Nested Case-Control: การสุ่มจาก cohort อย่างมีประสิทธิภาพสำหรับการวิจัยเชิงสังเกต
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

การศึกษา Nested Case-Control: การสุ่มจาก cohort อย่างมีประสิทธิภาพสำหรับการวิจัยเชิงสังเกต

nested case-control สุ่ม cases และ controls จาก cohort ที่กำหนดไว้ การสุ่ม controls และวิธีวิเคราะห์เป็นตัวกำหนดว่าค่าประมาณแทน disease odds, risk หรือ hazard หรือ rate ratio

ไทย23 Sept 2026· 6 min read
ตารางความแม่นยำการวินิจฉัยแบบสมดุลและไม่สมดุล: การสุ่มแบบ single-gate, two-gate และ index-stratified
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

ตารางความแม่นยำการวินิจฉัยแบบสมดุลและไม่สมดุล: การสุ่มแบบ single-gate, two-gate และ index-stratified

ความแม่นยำการวินิจฉัยขึ้นกับผู้ที่เข้าสู่การศึกษาและวิธีตรวจยืนยัน บทความนี้อธิบายผลของ two-gate enrichment, spectrum effects และ two-phase sampling ต่อการตีความค่าต่าง ๆ

ไทย23 Sept 2026· 4 min read
แบบการสุ่มตัวอย่างภาคตัดขวางเชิงอุปมา: การสุ่มแบบประชากร แบบ cohort และแบบ case-control สำหรับ exposure หายากกับ outcome หายาก
Clinical Epidemiology ResearchUniqcret doctor knowledgesMethodology and Research Design

แบบการสุ่มตัวอย่างภาคตัดขวางเชิงอุปมา: การสุ่มแบบประชากร แบบ cohort และแบบ case-control สำหรับ exposure หายากกับ outcome หายาก

กรอบการสอนนี้เชื่อมวิธีสุ่มตัวอย่างภาคตัดขวางกับสิ่งที่พบได้น้อย พร้อมชี้ว่าค่าประมาณใดยังตีความได้ และเมื่อใดต้องใช้ sampling weights

ไทย23 Sept 2026· 4 min read
Pooling 95% CI และ Effect Sizes: เมื่อไรควรใช้ Fixed-effect, Random-effects, Bootstrap และ Rubin's Rules
Clinical Epidemiology ResearchMethodology and Research Design

Pooling 95% CI และ Effect Sizes: เมื่อไรควรใช้ Fixed-effect, Random-effects, Bootstrap และ Rubin's Rules

อย่าเฉลี่ยขอบล่างและขอบบนของ 95% CI หลายช่วงเข้าด้วยกัน แต่ให้เลือกวิธี pooling ตามที่มาของ estimates เหล่านั้น

ไทย22 Sept 2026· 24 min read
Pooling 95% Confidence Intervals and Effect Sizes: Fixed-effect, Random-effects, Bootstrap, or Rubin's Rules?
Clinical Epidemiology ResearchMethodology and Research Design

Pooling 95% Confidence Intervals and Effect Sizes: Fixed-effect, Random-effects, Bootstrap, or Rubin's Rules?

Do not average the ends of several 95% confidence intervals: pick the pooling method that matches where the estimates came from.

EN22 Sept 2026· 29 min read
Deterministic กับ Non-Deterministic Output ในซอฟต์แวร์และระบบ AI
Data-Sci & Digital HealthBasic InfoTech & Computing Nexus

Deterministic กับ Non-Deterministic Output ในซอฟต์แวร์และระบบ AI

ส่วนไหนของเวิร์กโฟลว์ AI ที่ให้ผลเดิมทุกครั้ง ส่วนไหนที่ทำไม่ได้ และจะห่อการตัดสินเชิงความน่าจะเป็นไว้ในตรรกะแบบ deterministic ได้อย่างไร

ไทย22 Sept 2026· 12 min read
Deterministic vs Non-Deterministic Outputs in Software and AI Systems
Data-Sci & Digital HealthBasic InfoTech & Computing Nexus

Deterministic vs Non-Deterministic Outputs in Software and AI Systems

Which parts of an AI workflow repeat exactly, which cannot, and how to wrap probabilistic judgment in deterministic control.

EN22 Sept 2026· 13 min read
Harness: มันไม่ใช่ Tool และไม่ได้ทำให้ Agent เก่งขึ้น — มันทำให้ Agent ไปได้เฉพาะทางที่เรายอมให้ไป
U are tificial intelligenceBasic InfoTech & Computing Nexus

Harness: มันไม่ใช่ Tool และไม่ได้ทำให้ Agent เก่งขึ้น — มันทำให้ Agent ไปได้เฉพาะทางที่เรายอมให้ไป

ทุกวันนี้แทบทุกอย่างที่อยู่รอบ LLM ถูกเรียกว่า harness ไปหมด ทั้ง tools, MCP, memory, prompt, skills และ orchestration — ความสะดวกนั้นทำให้เราพลาดความหมายทางวิศวกรรมที่สำคัญที่สุดของคำนี้ไป: harness ไม่ได้ทำให้ agent เก่งขึ้น แต่มันเป็นตัวกำหนดว่าความสามารถที่ model มีอยู่แล้วจะได้รับอนุญาตให้เดินไปถึง outcome ผ่านทางไหนได้บ้าง

ไทย13 Sept 2026· 12 min read
Harness Is Not a Tool — It Controls Which Paths an Agent May Take to the Outcome
U are tificial intelligenceBasic InfoTech & Computing Nexus

Harness Is Not a Tool — It Controls Which Paths an Agent May Take to the Outcome

Almost everything around an LLM is now called a harness — tools, MCP, memory, prompts, skills, orchestration. That convenience costs us the word's most important engineering meaning: a harness does not make an agent smarter, it decides which paths the capability the model already has is allowed to travel on its way to the outcome.

EN13 Sept 2026· 11 min read
เปิดใช้งาน 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· 9 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· 9 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
Blog — Uniqcret