Posts

Showing posts from August, 2025

Why Treatment Assignment and Potential Outcomes Are Not Independent in Observational Studies ?

   Step-by-Step Explanation: 1. What Are Potential Outcomes? In causal inference , for each individual we define two potential outcomes : Y ( 0 ) Y(0) : the outcome the person would have if they did not receive the treatment. Y ( 1 ) Y(1) : the outcome the person would have if they did receive the treatment. 📌 These are hypothetical — for each person, we only get to observe one of them in real life (depending on their treatment assignment). 2. What Is T T ? T T  is the treatment assignment : T = 1 T = 1 : treated T = 0 T = 0 : control (not treated) 3. What Does "Not Independent" Mean? Saying that the potential outcomes ( Y ( 0 ) , Y ( 1 ) ) and  T T  are not independent means: The likelihood of receiving treatment depends on something that also affects the outcome . In math: ( Y ( 0 ) , Y ( 1 ))⊥T That is: the treatment assignment is related to the outcome you’d have had with or without treatment. 4. 🔄 Why Is...

Mastering PROC SQL: Essential Statements for Data Management

1.Joining Tables Example datasets: data sales; input id product $ amount; datalines; 1 A 100 2 B 150 3 C 200 ; run; data customer; input id name $; datalines; 1 John 2 Mary 4 Alex ; run; INNER JOIN (only matches) proc sql; select a.id, a.product, a.amount, b.name from sales as a inner join customer as b on a.id = b.id; quit; LEFT JOIN (all sales, add customer if match) proc sql; select a.id, a.product, a.amount, b.name from sales as a left join customer as b on a.id = b.id; quit; FULL JOIN (everything) proc sql; select a.id, a.product, a.amount, b.name from sales as a full join customer as b on a.id = b.id; quit; 2. Subqueries proc sql; select * from example where value = (select max(value) from example); quit; 🔹 Finds rows matching a nested query (here: the max value). 3. ON (JOIN condition) General Syntax proc sql; select a.col1, b.col2 from tableA as a join tableB as b on a.key = b.key; quit; tableA and tableB are data...

What Is a Rolling Baseline and How to Use ?

  What Is a Rolling Baseline? A  rolling baseline  refers to a flexible approach to defining the baseline time point for each participant, especially when participants are enrolled at different times or when baseline data is collected over a period rather than at a fixed time. In External Studies: External studies often use  real-world data  or  external control arms . A rolling baseline allows each subject’s  index date  (start of observation or treatment) to be defined individually, based on when they meet inclusion criteria or initiate treatment. This is especially useful when aligning external data with internal trial data for comparative analysis. 🧠 Why Use a Rolling Baseline? Variable Enrollment Timing : Participants may enter the study at different times, so a fixed baseline date isn't feasible. Real-World Data Integration : When using external data sources (e.g., EHRs, registries), the baseline must be tailored to each subject’s timeline....

Understanding Subgroup and Sensitivity Analyses in Clinical Research

  🔍 Subgroup Analysis Purpose : To explore whether the treatment effect varies across different subsets of the study population. ✅ Common Subgroups: Age groups (e.g., children vs. adults) Sex (male vs. female) Disease severity Geographic region Genetic markers 🔎 Why it's done: To identify  heterogeneity of treatment effects To support  personalized medicine To generate  hypotheses  for future studies To check  consistency  of results across groups ⚠️ Subgroup analyses are often exploratory and should be interpreted cautiously, especially if not pre-specified. 🔍 Sensitivity Analysis Purpose : To test the  robustness  of the main findings by varying assumptions, methods, or data inputs. ✅ Common Scenarios: Handling missing data (e.g., using multiple imputation vs. complete case analysis) Changing inclusion/exclusion criteria Using alternative statistical models Excluding outliers or protocol deviations 🔎 Why it's done: To assess...

What is an OLE Study?

  An   Open Label Extension (OLE)   study is a type of clinical trial that typically follows a   double-blind, randomized controlled trial (RCT) . Here's a breakdown of what it means and how it's used: 🔍 What is an OLE Study? Definition : An OLE is a  single-arm, open-label clinical trial  where all participants receive the investigational drug. Both the participants and investigators know what treatment is being administered. Purpose : To collect  long-term safety and efficacy data  on a drug that showed promise in the preceding RCT  1 . ✅ Key Features Continuation of Treatment : Participants who completed the initial RCT are offered continued access to the investigational drug. No Control Arm : Unlike the RCT, there’s no placebo or comparator group in the OLE phase. Transparency : Everyone knows the treatment being given—there’s no blinding. Extended Follow-Up : Allows researchers to monitor long-term outcomes, side effects, and tolerabili...

KM Curves , Median Survival Times and Ratio of the Median Survival Times

Image
 1. An Example of Kaplan-Meier Curves survival probabilities: we count the number of subjects surviving past the specified time being considered and divide this number by 21, the number of subjects at the start of follow-up. There is alternative formula is called the Kaplan-Meier (KM) approach and can be illustrated using the group 2 data even though all values of q are zero. KM formula =product limit formula For a specified failure time t(f), the fraction may be generally expressed as the conditional probability of surviving past time t(f), given availability (i.e., in the risk set) at time t(f). 2. Median Survival Times:  The median survival time is the time point at which the probability of survival equals 50%.  Some things to keep in mind: • If the probability of survival exceeds 50% at the longest time point, then the median survival time cannot be computed. Prism reports that the median survival is “undefined”. The logrank comparison of curves compares entire c...

Understanding Binding vs. Non-Binding Futility Analysis in Clinical Trials

Image
  1.What is the difference between binding futility and non-binding futility analysis ? In clinical trials,   futility analysis   is a type of interim analysis used to determine whether it is unlikely that a study will achieve its objectives if it continues as planned. This helps avoid wasting resources and exposing participants to ineffective treatments. Futility analyses can be   binding   or   non-binding , and the distinction is important for trial design and interpretation. 🔹 Binding Futility Analysis Definition : If the futility boundary is crossed, the trial  must be stopped . Implication : It is part of the formal decision-making process and is enforced by the protocol or statistical analysis plan. Use Case : Often used when ethical or resource concerns demand early termination if the treatment is clearly not effective. 🔹 Non-Binding Futility Analysis Definition : If the futility boundary is crossed, the trial  may continue ...