Application: Profit vs. Outcomes in Heart Attack Patients
$$
If you want to see the data in a table, run this.
The Mean Function.
Binary.
Continuous.
viewof xx = Inputs.radio(
["x.1", "x.2", "x.3", "x.4", "x.5", "x.6"], {value:"x.1", label:"x"})
viewof yy = Inputs.radio(
new Map([["binary", "y"],
["continuous", "y.continuous"]]), {value:"y", label:"y"})
Learn to predict outcomes for all combinations of treatment and covariates.
Compare predictions for different treatments to estimate the effect of treatment.
formula_options = new Map(
[["lines","y ~ w*(x.1 + x.2 + x.3 + x.4 + x.5 + x.6)"],
["parallel lines","y ~ w + x.1 + x.2 + x.3 + x.4 + x.5 + x.6"]])
viewof example_formula = Inputs.radio(formula_options,
{value: formula_options.get("lines"), label: "model"})
And if we parameterize it the right way,
And our prediction for the treatment effect
This means that if we get R to tell us the coefficient
The little squares you see are the predictions
Some of them are outside the interval
This makes people uncomfortable. To fix this, they often use what are called generalized linear models.
Here
viewof x = Inputs.radio(
["x.1", "x.2", "x.3", "x.4", "x.5", "x.6"], {value:"x.1", label:"x"})
viewof trim_level = Inputs.radio(
[1, 2, 5, 10, 20, 100, Infinity], {value: 100, label:"trim γ at"})
viewof y = Inputs.radio(
new Map([["binary", "y"],
["continuous", "y.continuous"]]), {value:"y", label:"y"})
Scatter Plot
Without IPW.
These are for our ATT estimators using inverse probability weighting and not.
The sampling assumption we do without if we were willing to settle for internal validity: getting the effect on the patients in our sample right. We’d do our statistics thinking about the sampling distribution of our estimator when all that’s random is treatment assignment. Without something like the randomization assumption, estimating this effect would require a very different analysis than what we see in these papers if it was possible at all.
Almost. You’ll see a difference or two on the next slide.
To generate these, we find a sort of ‘square root’,
That’s if you haven’t clicked anything. To change the model, click the button.
If you want to change that, go back and change it there. This’ll update automatically.
See the column ‘Adjusted OR’ in the ‘PCI’ row in Table 5.