co-Author and Maintainer, package ivmodel
vignette: to appear Journal of Statistical Software ivmodel: An R Package for Inference and Sensitivity Analysis of Instrumental Variables Models with One Endogenous Variable
Blog posting praising Mr. Kang presentation Bay Area useR Group on youtube
Also package sisVIVE Title Some Invalid Some Valid Instrumental Variables Estimator
To come. Natural experiments: Regression Discontinuity and Interrupted Time-series
Week 7 Review Questions
From Week 7 Computing Corner
1. Compliance data, IV analysis. Week 6 RQ3 used some artificial data from Stat209, imitating Efron-Feldman cholestyramine trial. That solution showed you the widely used ivreg function from package AER package. Redo the ivreg analyses using functions from the ivmodel package (described in CC week 7).
2. Use the Card data, described in the ivmodel presentation and vignette, to carry out some basic IV analyses. Compare ivreg with some analyses using the ivmodel package.
Week 8 -- Non-experimental designs
In the news Music: Sugar Sugar Gilligan's Island version
Bench Science Rules?
UCLA press release: Fructose alters hundreds of brain genes, which can lead to a wide range of diseases. UCLA scientists report that diet rich in omega-3 fatty acids can reverse the damage
Popular press: Sugar can cause brain damage, claim scientists (but salmon reverses it)
Research Paper: Systems Nutrigenomics Reveals Brain Gene Networks Linking Metabolic and Brain Disorders
Yet FDA hearts sugar: e.g. The FDA still thinks that cookies can be healthier than fish
Extra For Interrupted time series in Computing Corner: Proposition 47 California ballot measure blamed for shoplifting jump
Lecture Topics Lecture 8 slide deck
lecture 08: non-experimental designs
difference-in-differences - imbens and woolridge
discontinuity - lee and lemieux
Computing Corner:
Natural experiments: Regression Discontinuity and Interrupted Time-series
A. Interrupted Time-series
Overviews:
Interrupted Time Series Quasi-Experiments Gene V Glass Arizona State University
Interrupted Time Series Designs In Health Technology Assessment: Lessons From Two Systematic Reviews Of Behavior Change Strategies Craig R. Ramsay University Of Aberdeen, International Journal Of Technology Assessment In Health Care, 19:4 (2003), 613-623.
Original publication (ozone data):
Box, G. E. P. and G. C. Tiao. 1975. Intervention Analysis with Applications to Economic and Environmental Problems." Journal of the American Statistical Association. 70:70-79. SAS example for ozone data
Class example: Closing time (glm kludge)
Time Series Analysis with R section 4.6
Rogosa R-session
Applications:
Did fertility go up after the Oklahoma City bombing? An analysis of births in metropolitan counties in Oklahoma, 1990-1999. Demography, 2005.
Box-tiao time series models for impact assessment Evaluation Quarterly 1979
Interrupted time-series analysis and its application to behavioral data
Donald P. Hartmann, John M. Gottman, Richard R. Jones, William Gardner, Alan E. Kazdin, and Russell S. Vaught J Appl Behav Anal. 1980 Winter; 13(4): 543-559.
Segmented regression analysis of interrupted time series studies in medication use research. By: Wagner, A. K.; Soumerai, S. B.; Zhang, F.; Ross-Degnan, D.. Journal of Clinical Pharmacy & Therapeutics, Aug2002, Vol. 27 Issue 4, p299-309,
R-packages:
tscount, vignette BayesSingleSub: Computation of Bayes factors for interrupted time-series designs
B. Regression Discontinuity Designs (bumped to week 9)
Example from rdd manual (Stat209 handout) ascii version
Angrist-Lavy Maimondes (class size) data sections 1.3, 3.2, 5.2.3, 5.3 DOS text
read data ang = read.dta("http://www.ats.ucla.edu/stat/stata/examples/methods_matter/chapter9/angrist.dta")
R-package--rdd; Regression Discontinuity Estimation Author Drew Dimmery
Also Package rdrobust Title Robust data-driven statistical inference in Regression-Discontinuity designs
Regression Discontinuity Resources
Stat209, Regression Discontinuity handout
Trochim W.M. & Cappelleri J.C. (1992). "Cutoff assignment strategies for enhancing randomized clinical trials." Controlled Clinical Trials, 13, 190-212. pubmed link
Journal of Econometrics (special issue) Volume 142, Issue 2, February 2008, The regression discontinuity design: Theory and applications Regression discontinuity designs: A guide to practice, Guido W. Imbens, Thomas Lemieux
Another Econometric treatment
Also from Journal of Econometrics (special issue) Volume 142, Issue 2, February 2008, The regression discontinuity design: Theory and applications Waiting for Life to Arrive: A history of the regression-discontinuity design in Psychology, Statistics and Economics, Thomas D Cook
the original paper: Thistlewaite, D., and D. Campbell (1960): "Regression-Discontinuity Analysis: An Alternative
to the Ex Post Facto Experiment," Journal of Educational Psychology, 51, 309-317.
Capitalizing on Nonrandom Assignment to Treatments: A Regression-Discontinuity Evaluation of a Crime-Control Program Richard A. Berk; David Rauma Journal of the American Statistical Association, Vol. 78, No. 381. (Mar., 1983), pp. 21-27. Jstor
Berk, R.A. & de Leeuw, J. (1999). "An evaluation of California's inmate classification system using a generalized regression discontinuity design." Journal of the American Statistical Association, 94(448), 1045-1052. Jstor
To come: Dose-response functions: package causaldrf
Week 8 Review Questions
Computing Exercises
1. Interrupted Time Series example, redux
Create a version of the its 'closing time' example presented in class (example linked above) with the 50 months before intervention having mean fatality = 1 and after intervention mean fatality = 2.
Carry out the glm approximation to the time series analysis.
2. Time 1 Time 2 observational data, Differences in Differences analysis.
We reuse some time-1, time-2 observational data generated to illustrate Lord's paradox (week 9, Stat209) -- gender differences in weight gain. (The 'paradox' is solved by Holland, Wainer, Rubin using potential outcomes.)
The set up for these artificial data is females gain, males no change
corr .7 within gender, equal vars time1 time 2 within gender
means
M F
X (t1) 170 120
Y (t2) 170 130
comparison of "gains" 170 - 170 - (130 - 120) = -10 negative effect males (females gain more).
ancova: 170 - 130 - .7*(170 - 120) = 5 positive male effect
So: does being male cause a student to gain weight or lose weight? Illustrate forms of diffs-in-diffs analyses.
wide form for these data long form for these data
Week 9 -- Graphical models and other approaches
In the news Grand finale (trio) Music: My church
1. Going To Church Could Help You Live Longer Publication: JAMA Internal Medicine
Tyler VanderWeele, Harvard, 2015 book Explanation in Causal Inference: Methods for Mediation and Interaction
2. Air Rage. First-class cabin fuels 'air rage' among passengers flying coach Publication: PNAS.
3. Retirement?? Retirement really COULD kill you: Researchers find those who work past 65 live longer bonus music Only The Good Die Young
Publication: Association of retirement age with mortality: a population-based longitudinal study among older adults in the USA. Journal of Epidemiology and Community Health.
Lecture Topics Lecture 9 slide deck
(i) directed acyclic graphs (link to paper with discussions)
- related: single world intervention graphs (link)
(ii) inverse probability weighting (link)
Computing Corner: Dose response functions (and multiple groups): Beyond Binary Treatments
package causaldrf vignette: Estimating Average Dose Response Functions Using the R Package causaldrf Rnw file for vignette dot-R file for vignette
Rogosa session, causaldrf examples
also covariate balancing propensity score, package CBPS
Background publications:
The Propensity Score with Continuous Treatments
Causal Inference With General Treatment Regimes: Generalizing the Propensity Score, Journal of the American Statistical Association, Vol. 99, No. 467 (September), pp. 854-866.
bumped: graphical model (and do-calculus) applications: one resource, Identifying Causal Effects with the R Package causaleffect
Week 9 Review Questions
Computing Exercises
1. Regression Discontinuity, classic "Sharp" design. Replicate the package rdd toy example: cutpoint = 0, sharp design, with treatment effect of 3 units (instead of 10). Try out the analysis of covariance (Rubin 1977) estimate and compare with rdd output and plot. Pick off the observations used in the Half-BW estimate and verify using t-test or wilcoxon.
Extra: try out also the rdrobust package for this sharp design.
2. Systematic Assignment, "fuzzy design". Probabilistic assignment on the basis of the covariate.
i. Create artificial data with the following specification. 10,000 observations; premeasure (Y_uc in my session) gaussian mean 10 variance 1. Effect of intervention (rho) if in the treatment group is 2 (or close to 2) and
uncorrelated with Y_uc. Probability of being in the treatment group depends on Y_uc but is not a deterministic step-function ("sharp design"): Pr(treatment|Y_uc) = pnorm(Y_uc, 10,1) . Plot that function.
ii. Try out analysis of covariance with Y_uc as covariate. Obtain a confidence interval for the effect of the treatment.
iii. Try out the fancy econometric estimators (using finite support) as in the rdd package. See if you find that they work poorly in this very basic fuzzy design example.
Extra: try out also the rdrobust package for this fuzzy design.
3. Dose-Response functions. IPW (aka importance sampling) can't hit the curve? Can't hit anything??
In week 9 Computing Corner we showed results for ADRF (average dose-response function) estimates using Imbens very clever artificial data example from the linked causaldrf vignette (see also CC_9 slides).
IPW results (see Weeks 3 and 4 Computing Corner for examples for binary treatements) were notable in apparant bad bad performance (all other estimates did pretty well). Keep in mind this artificial data test is not even a "phase 2" hurdle, as we are given the selection variables (X_1, X_2) that are responsible for individuals selecting dose (here denoted by T) other than randomness.
I was asked in class why IPW appears to flop so badly, and gave a very brief response given time, but I should have added that I am a skeptic about IPW value even in the binary treatment scenario.
As IPW is dominant in applications like long-tern occupation exposures (to bad stuff), the dose-reponse setting is quite relevant. The artificial data ADRF has an important feature of a non-monotonic dip, remeniscent of alcohol or even salt (a bit above 0 is better than zero) for health outcomes. So for another look at IPW, I tried to make a much easier example, with basically a straight-line ADRF (just with a little wiggle) by limiting dose
(T) to > .5.
So try out the comparison of the hi_estimate (shown in class) and the iptw_estimate both from the causaldrf package with the true ADRF from the artificial data construction using values T > .5 (about half the data).
Are we any happier with the value of IPW (importance sampling)? Solution indicates to me: "no", YMMV.