
AIC Akaike Information Criterion and BIC Bayesian Information Criterion in Logistic Regression
Your output: Model | N ll(null) ll(model) df AIC BIC -------------------------------------------------------------- . | 3135 -1906.079 -1807.527 2 3619.054 3631.155 What Are AIC and BIC? Both are information criteria used to compare models. They answer: Which model balances goodness-of-fit AND parsimony best? They penalize complexity. AIC stands for: Akaike Information Criterion Named after: Hirotugu Akaike (1974) BIC stands for: Bayesian

ROC Analysis and Diagnostic Test Accuracy: From Discrimination to Cut-Point Selection in Stata (roctab & diagt)
Introduction (When the outcome is disease status and the goal is test performance) In diagnostic research, we are interested in how well a test distinguishes between patients with and without disease. We are not only interested in whether a test is associated with disease, but how accurately it classifies patients , and whether this accuracy depends on the chosen cut-point . 1. ROC Analysis (Discrimination & Cut-point Exploration) (Describe performance across all thresholds

Survival Analysis in Clinical Epidemiology Stata Code dominant: From Kaplan–Meier to Cox Regression (Non-parametric, Semi-parametric)
Introduction Survival analysis is used when time matters . We are not only interested in whether an event happens, but also when it happens, and we must correctly handle censoring (patients who do not experience the event during follow-up). 1. Non-parametric Survival Analysis (Describe and compare survival — no model assumptions) Step 1: Survival-time setting (stset) Before doing anything, we must tell Stata: What is time What is event Who is censored stset time, failure(e

Choosing RR or OR in Epidemiologic Studies: cs vs cc Commands in Stata
If you remember one rule , remember this: cs → cohort/RCT/cross-sectional when you can interpret risk (or prevalence) → gives RR/RD cc → case-control (sampled by outcome) → gives OR (only) (Stata even labels this as “Risk & Odds Analysis” with cs for RR and logistic for OR in the quick reference.) The decision flowchart How were subjects selected? A) Selected by EXPOSURE status (exposed/unexposed) and followed (or measured) outcome? -> Cohort / RCT / cross-sectional without

Incidence Rate [IR] and Incidence Rate Ratio [IRR]: Analysis of Rates in Clinical Epidemiology Using Stata
1. Introduction In clinical epidemiology, outcomes often occur over time , and individuals may contribute different lengths of follow-up . In such settings, simple risks or proportions are inadequate. Instead, incidence rates (IRs) and incidence rate ratios (IRRs) are appropriate measures of disease incidence and exposure effects. Stata’s ir command is designed for this purpose and is widely used in cohort studies, occupational epidemiology, pharmacoepidemiology, and regis

Clinical Trial Lifecycle Explained: From Protocol Development to SAP and CSR
1) Developing Protocol + Sample Size A. Scientific + clinical foundation Define study rationale (unmet need, mechanism, prior evidence, feasibility). Translate to objectives : Primary objective (one “win condition”) Key secondary objectives (ranked) Exploratory objectives (biomarkers, PROs, substudies) Define endpoint strategy Primary endpoint (precise definition, timepoint, ascertainment) Secondary endpoints (hierarchy / multiplicity plan) Safety endpoints (AEs, SAEs, AESIs

Binreg in Stata: Odds Ratios, Risk Ratios, and Why Modified Poisson Is Preferred
1. Introduction Binary outcomes are common in clinical and epidemiological research. Examples include disease status (yes/no), mortality (dead/alive), or treatment response (success/failure). In Stata, several commands can be used to analyze binary outcomes, including logistic, binreg, and glm with different families and links. Although these commands may appear similar, they estimate different effect measures, rely on different assumptions, and can behave very differently in

Epitab in Stata: Classical Epidemiologic Analysis with 2×2 (confusion matrix) and Stratified Tables
Overview Epitab is a suite of Stata commands designed for classical epidemiologic analyses based on 2×2 and stratified tables . It provides design-consistent estimation of effect measures, confidence intervals, and attributable fractions across cohort , case–control , cross-sectional , and matched study designs. Unlike regression models (e.g., logistic, poisson, stcox), Epitab commands are table-based , transparent, and ideal for: Crude and stratified analyses Teaching epi

ROBINS-I V2 (2025): Explicit Cut-off Lines for Risk-of-Bias Judgement
Link to ROBIN-I V2 Website A Domain-by-Domain Operational Guide Core Principle of ROBINS-I V2 ROBINS-I V2 is anchored on the identification of material bias : Material bias = bias that is large enough to meaningfully distort the estimated effect or invalidate causal interpretation. All cut-offs below are therefore defined by impact on causal interpretability , not by the mere presence of bias. Domain 1 — Bias Due to Confounding Low Risk (Low except for residual confounding)

Transformer Architecture for Generative Models: Why GPT Is Decoder-Only and How It Reads Without an Encoder
Why GPT Is Decoder-Only and How It “Reads” Without an Encoder Introduction When people hear the word Transformer , they often think of the classic Encoder–Decoder architecture used in machine translation. However, Generative models like GPT do not use an encoder at all . This raises a common question: If GPT has no encoder, how does it read and understand text? This article explains: Why GPT is decoder-only How GPT “reads” input without an encoder The role of causal self-att

Imputation in Clinical Research: Prediction vs Causal Thinking Explained
A Practical Guide to Prediction, Causal Inference, and Longitudinal Data 1. Why Imputation Needs Careful Thinking Missing data occur in almost all clinical datasets: Patients miss visits Laboratory tests are not ordered Follow-up is incomplete Imputation is used to replace missing values so that: Statistical power is preserved Bias from complete-case analysis is reduced However, imputation is not a neutral technical step .It directly affects: Validity of estimates Model per

Malnutrition (Undernutrition) — full guide (definitions, grading, diagnosis cut-offs, primary vs secondary causes, and management)
1) Core definitions Malnutrition = deficiency, excess, or imbalance of nutrients, or impaired nutrient use. ( TB Knowledge Sharing ) Clinically, people often mean undernutrition (the “too little” side): Undernutrition includes ( TB Knowledge Sharing ) Wasting / Acute malnutrition = recent/rapid weight loss → low weight-for-height/length and/or nutritional oedema . ( fscluster.org ) Stunting / Chronic malnutrition = long-term growth failure → low height-for-age . ( Worl

Coefficient (Slope) and Intercept (Baseline) level in Clinical Prediction Models
In clinical prediction models, the coefficient (slope/weight) tells how much each predictor pushes the predicted risk up or down, while the intercept (baseline/starting level) sets the model’s starting risk before any predictors are applied. When you build a clinical prediction model (CPM) using regression (linear, logistic, Cox, etc.), the model is basically a risk score rule : Start from a baseline level of risk Then add or subtract risk depending on patient predictors Two

TRISS Score (Trauma and Injury Severity Score): Predicting Survival in Trauma Patients
Introduction In trauma medicine, accurately predicting patient outcomes is essential for clinical decision-making, quality assurance, and research . While anatomical scores such as AIS and ISS describe injury severity, they do not account for the patient’s physiological condition at presentation. To address this limitation, the Trauma and Injury Severity Score (TRISS) was developed. TRISS integrates anatomical injury severity, physiological status, age, and mechanism of i

The Abbreviated Injury Scale (AIS) and Injury Severity Score (ISS): A Structured Approach to Trauma Severity Assessment
Introduction Trauma care requires rapid, standardized assessment of injury severity to guide triage, management, prognosis, and research. To achieve this, trauma systems worldwide use the Abbreviated Injury Scale (AIS) and the derived Injury Severity Score (ISS) . Together, these tools provide an objective, anatomically based measure of trauma severity and correlate strongly with morbidity and mortality. Abbreviated Injury Scale (AIS) Definition The Abbreviated Injury Scal

Diagnosis and Management of Ingrown Nail (Onychocryptosis) [เล็บขบ]
1️⃣ Diagnosis: Ingrown Nail (Onychocryptosis) Definition An ingrown nail occurs when the edge of the nail plate penetrates the periungual skin , causing inflammation ± infection . Common Sites ✅ Great toe (most common) Less common: fingers (often from trauma, nail biting) Risk Factors (Exam favorite ❗) Improper nail trimming (rounded edges ❌) Tight shoes / high heels Repeated trauma Hyperhidrosis Obesity Diabetes mellitus Nail biting (fingers) Poor foot hygiene 2️⃣ Clinical











