490 likes | 847 Views
Fitting Marginal Structural Models. Eleanor M Pullenayegum Asst Professor Dept of Clin. Epi & Biostatistics pullena@mcmaster.ca. Outline. Causality and observational data Inverse-Probability weighting and MSMs Fitting an MSM Goodness-of-fit Assumptions/ Interpretation.
E N D
Fitting Marginal Structural Models Eleanor M Pullenayegum Asst Professor Dept of Clin. Epi & Biostatistics pullena@mcmaster.ca
Outline • Causality and observational data • Inverse-Probability weighting and MSMs • Fitting an MSM • Goodness-of-fit • Assumptions/ Interpretation
Causality in Medical Research • Often want to establish a causal association between a treatment/exposure and an event • Difficult to do with observational data due to confounding • Gold-standard for causal inferences is the randomized trial • Randomize half the patients to receive the treatment/exposure, and half to receive usual care • Deals with measured and unmeasured confounders
Randomized trials are not always possible • Sometimes, they are unethical • cannot do a randomized trial on the effects of second-hand smoke on lung cancer • or a randomized trial of the effects of living near power stations • Sometimes, they are not feasible • Study of a rare disease (funding is an issue)
Observational Studies • Observe rather than experiment (or interfere!) • Recruit some people who are exposed to second-hand smoke and some who are not • Study communities living close to power lines vs. those who don’t • Confounding is a major concern • For 1st example, are workplace environment, home environment, age, gender, income similar between exposed and unexposed? • For 2nd example, are education, family income, air pollution similar between cases and controls?
Handling Confounding • Match exposed and unexposed on key confounders • e.g. for every family living close to a power station, attempt to find a control family living in a similar neighbourhood with a similar income • Adjust for confounders • for the smoking example, adjust for age, gender, level of education, income, type of work, family history of cancer etc. • Cannot deal with unmeasured confounders
Causal Pathways • There are some things we cannot adjust for • When studying the effect of a lipid-lowering drug on heart disease, we can’t adjust for LDL-cholesterol level
Causal Pathways Drug LDL-cholesterol Heart Disease LDL-cholesterol mediates the effect of the drug Cannot adjust for variables that are on the causal pathway between exposure and outcome.
Motivating Example • Juvenile Dermatomyositis (JDM) is a rare but serious skin/muscle disease in children • Standard treatment is with steroids (Prednisone), however these have unpleasant side-effects • Intravenous immunoglobulin (IVIg) is a possible alternative treatment • DAS measures disease activity
JDM Dataset • 81 kids, 7 on IVIg at baseline, 23 on IVIG later • Outcome is time to quiescence • Quiescence happens when DAS=0 • IVIg tends to be given when the child is doing particularly badly (high DAS) • DAS is a counfounder
Causal Pathway for JDM study • DAS confounds IVIg and outcome • DAS is on the causal pathway … DASt DASt+1 … IVIgt IVIgt+1 Time-to-Quiescence
A Thought Experiment • Suppose that at each time t, we could create an identical copy of each child i. • Then if the real child received IVIG, we would give the copy control and vice versa • We could then compare the child to its copy • Solves confounding by matching: the child is matched with the copy • If treatment varies on a monthly basis and we follow for 5 years, we would have 260-1 copies
Counterfactuals • Clearly, this is impossible. • But we can use the idea • Define the counterfactuals for child i to be the outcomes for each of the 260-1 imaginary copies • Idea: treat the counterfactuals as missing data
Inverse-Probability Weighting • Inverse-Probability Weighting (IPW) is a way of re-weighting the dataset to account for selective observation • E.g. if we have missing data, then we weight the observed data by the inverse of the probability of being observed • Why does this work? • Suppose we have a response Yij, treatment indicator xij and Rij=1 if Yij observed, 0 o/w
Inverse-Probability Weighting • Suppose we want to fit the marginal model • Usually, we solve the GEE equation • If we use just the observed data, we solve • LHS does not have mean 0
Inverse-Probability Weighting • If we replace D by with pij, the conditional probability of observing Yij, then • What to condition on? • Mustcondition on Yij • If MAR, then conditionally independent given previous Y
Marginal Structural Models • MSMs use inverse-probability weighting to deal with the unobserved (“missing”) counterfactuals • We cannot adjust for confounders… • …but using IPW, can re-weight the dataset so that treatment and covariates are unconfounded • i.e. mean covariate levels are the sample between treated and untreated patients • So can do a simple marginal analysis
Probability-of-Treatment Model • Weighting is based on the Probability-of-Treatment model • Treatment is longitudinal • For each child at each time, need probability of receiving the observed treatment trajectory • Probability is conditional on past responses and confounders • Assume independent of current response
JDM Example • Probability of being on IVIg at baseline (logistic regression) • Probability of transitioning onto IVIg (Cox PH) • Probability of transitioning off IVIg (Cox PH) • Suppose a child initiates IVIG at 8 months and is still on IVIG at 12 months. • What is the probability of the observed treatment pattern?
Trratment probability P(transition at month 8) P(no transition before month 8) P(no transition off before month 12) P(not on IVIg at baseline) 0 8 12 No IVIg Initiate IVIg Still on IVIG
Model Fitting • First identified covariates univariately • Then entered those that were sig. into model and refined (by removing those that were no longer sig.) • IVIg at baseline: Functional status (any vs. none) OR 11.6, 95% CI 1.94 to 69.7; abnormal swallow/voice OR 6.28, 95% CI 0.983 to 4.02. • IVIg termination: no covariates
Assessing goodness-of-fit • If the IPT weights are correct, in the re-weighted population, treatment and covariates are unconfounded • This property is • crucial • testable • …so we should test it!
Goodness-of-fit in the JDM study • Biggest concern is that kids are doing badly when they start IVIg • If inverse-probability weights are correct, then at each time t, amongst patients previously IVIg-naïve, IVIg is not associated with covariates. • Will look at differences in mean covariate values by current IVIg status amongst patients previously IVIg-naïve • Data are longitudinal, so use a GEE analysis, adjusting for time
Model 1 – HRs for Treatment Initiation Hazard Ratios and 95% confidence intervals for initiating treatment
Model 2 -Revised Treatment initiation Hazard Ratios and 95% confidence intervals for initiating treatment
Back to basics • Some patients start IVIg because they are steroid-resistant (early-starters) • Others start because they are steroid-dependent (late-starters) • Repeat model-fitting process separately for early and late starters
Other concerns with MSMs • Format of treatment effect (e.g. constant over time, PH etc.) • Unmeasured counfounders • Lack of efficiency • Experimental Treatment Assignment
Efficiency • IPW reduces bias but also reduces efficiency • The further the weights are from 1, the worse the efficiency • Can stabilise the weights: • Estimating equations will still be zero-mean if we multiply Dijj by a factor depending on j and treatment • In JDM study, we used Dijj=RijP(Rx history)/P(Rx history|confounders)
Efficiency – other techniques • Doubly robust methods (Bang & Robins) • Could have used a more information-rich outcome • Did a secondary analysis using DAS as the outcome – got far more precise (and more positive) results
Experimental Treatment Assignment • In order for MSMs to work, there must be some experimentality in the way treatment is assigned • Intuitively, if we can predict perfectly who will get what treatment, then we have complete confounding • Mathematically, if pij is 0 then we’re in trouble! • Actually, we get into trouble if pij = 0 or 1
Testing the ETA – simple checks • At each time j, review the distribution of covariates amongst those who are on treatment vs. those who are not. • Review the distribution of the weights • check p bounded away from 0/1 • In the JDM example, also check distn of transition probabilities
Testing the ETA – more advanced methods • Bootstrapping • Wang Y, Petersen ML, Bangsberg D, van der Laan MJ. Diagnosing bias in the inverse probability of treatment weighted estimator resulting from violation of experimental treatment assignment. UC Berkeley Division of Biostatistics working paper series, 2006.
Implementing MSMs • For time-to-event outcome, can do weighted PH regression in R • Used the svycoxph function from the survey package • For continuous (or binary) outcome, use weighted GEE • Used proc genmod in SAS with scgwt • Weighted GEEs are not straightforward in R • STATA could probably handle either type of outcome
MSMs - potentials • Often good observational databases exist • Should do what we can with them before using large amounts of money to do trials • Can deal with a time-varying treatment • Conceptually fairly straightforward • Do not have to model correlation structure in responses
MSMs - limitations • There may always be unmeasured confounders • Relies heavily on probability-of-treatment model being correct • Experimental ETA violations can often occur (particularly with small sample sizes) • Somewhat inefficient • Doubly robust methods may help • Not a replacement for an RCT
Key points • MSMs can help to establish causal associations from observational data • Make some strong assumptions • Need goodness-of-fit for measured confounders • Will never find the right model • Aim to find good models
References • Robins JM, Hernan MA, Brumback B. Marginal structural models and causal inference in epidemiology. Epidemiology 2000; 11: 550-560. • Bang H, Robins JM (2005). Doubly Robust Estimation in Missing Data and Causal Inference Models. Biometrics 61 (4), 962–973. • Pullenayegum EM, Lam C, Manlhiot C, Feldman BM. Fitting Marginal Structural Models: Estimating covariate-treatment associations in the re-weighted dataset can guide model fitting. Journal of Clinical Epidemiology. • Wang Y, Petersen ML, Bangsberg D, van der Laan MJ. Diagnosing bias in the inverse probability of treatment weighted estimator resulting from violation of experimental treatment assignment. UC Berkeley Division of Biostatistics working paper series, 2006.