Miscellaneous Notes
As a researcher, the most importat consideration is “How can I best separate the treatment assignment from potential outcomes?”
- “Block what you can, Randomize what you cannot”
- “No Causation without Manipulation”
Time-varying / Person-time Notation
It’s just notation but worth noting (hehe).
Example: one patient (), a physician, BP checked monthly at .
- : physician gives a high dose.
- : BP is HIGH. Switch to a low dose.
- : BP is OK. Stop.
Now answer the usual questions:
- Units? , . The unit is the patient at time t (a person-time), not the person. One person, three units!
- Treatment? . Treatment written as a function of the unit. Can have more than two levels (high dose, low dose, stop).
- Potential Outcome? . Outcome at time under the treatment at . Treatment goes in parentheses instead of a superscript, and the subscript is time, not person. Note the lag.
Coding the outcome:
In full, the outcome at could depend on the whole treatment history:
Crossing out is an assumption: the dose at has no carryover effect on the outcome at . Only the most recent treatment matters. This is what lets you write the shorter .
So what’s the Causal Effect formula used?
Low dose at gives OK at . High dose at gives HIGH at . So the effect is 1? Careful: this is a before/after comparison of two different units ( vs ), not two potential outcomes of the same unit. The true individual causal effect would be for , and you only ever see one of those (the fundamental problem again).
The difference above counts as causal only under extra assumptions: no carryover, and stability over time (the unit at is “the same” as the unit at ).
The ‘Sharp’ Null (Fisher)
The idea here is “How much do you care about the distribution of the counterfactual?” You want model-free? (Remember that a model is a set of distributions!)
Now here, you’re saying there is no effect for the given individual
TODO: See the cola and calcium example.
TODO: See the steps in experiments bro. Again. What you want from a test statistic is high power. Sample means is one thing. But there are very sophistacated ones; you should check for applicability.
See the idea here is to permute and shuffle and compute E[Y1] - E[Y0]. You compute the test statistic assumign that the outcome remains fixed no matter the treatment assigned. This gives you a distribution. So in the cola and water example, the statistic is 6.875. This is not zero. What does this mean? You plot these differences. You will get a nice bell curve. (So this means that model-based inference would work well.) THI SIS IMPORTANT. Now you compare this random shit to your test distribution and COMPUTE THAT P-VALUE! “Exact” in Fisher’s Exact test yo. Jesus.
TODO: “Model based inference” — what other things exist?
Fisher is useful for some early evidence, whether it’s “worth it” to continue.
Books
“Causal Inference In Statistics — A Primer” by the GOAT Himself. Read this first.
Graphs
- Daggity: Old and New 🤩
- Learn Graphs (and all sorts of other CI things) interactively.
- Ancestors, Parents, Children, Descendants (do this!)
- Covariates in DAGs (do this!)
- Learn Covariates in DAGs
Videos
Many of these are introductory.
- Richard McElreath - Science Before Statistics: Causal Inference
Three hours long but excellent. - Jonas Peters - Mini Course on Causality at the Broad Institute, Parts One, Two, and Three
- Judea Pearl - The New Science of Cause and Effect
The GOATed One Himself. - What is Inference?
Philosophical standpoint.
Other
- Sample Github Project for study/practice.
About that mess: When you say , you’re saying “I subjectively believe that when the model takes decision , I will see event .