Computational epidemiologist, causal inference researcher, amateur mycologist, and open-source enthusiast.
https://github.com/pzivich
#epidemiology #statistics #python #episky #causalsky
The random variables with hats are the model predicted versions
The random variables with hats are the model predicted versions
Here, \beta_1 is the average causal effect (since we are in the special case of linear models without interactions).
Here, \beta_1 is the average causal effect (since we are in the special case of linear models without interactions).
We have an unmeasured var, U, that is a confounder. So it seems like we are doomed for identification
But not with proximal causal inference! We can leverage the pair of proxies (Z,W)
We have an unmeasured var, U, that is a confounder. So it seems like we are doomed for identification
But not with proximal causal inference! We can leverage the pair of proxies (Z,W)
Essentially, we break everything into functions and evaluate those functions using those object pairs from before. That gives us the derivative of the function at a particular point
Essentially, we break everything into functions and evaluate those functions using those object pairs from before. That gives us the derivative of the function at a particular point
The computer approximates what the slope would be at a particular point. We do this by evaluating the function at two points (depending on what approximation method we use). Then we do 'rise over run' to compute the slope (and approx dx)
The computer approximates what the slope would be at a particular point. We do this by evaluating the function at two points (depending on what approximation method we use). Then we do 'rise over run' to compute the slope (and approx dx)
Below is a weird function we will do the derivative of
Below is a weird function we will do the derivative of
I won't get into the finer details, but this causes the whole procedure to under-estimate the variance
I won't get into the finer details, but this causes the whole procedure to under-estimate the variance
It didn't highlight that I had code provided as part of the paper. So, I followed up by asking it for code. It generated a new example (using the details from the paper example)
It didn't highlight that I had code provided as part of the paper. So, I followed up by asking it for code. It generated a new example (using the details from the paper example)
That zeroes out the contributions to the pooled logit model for events
That zeroes out the contributions to the pooled logit model for events
Here is where we exclude the events from contributing to the model (for the rows that correspond to the event times)
Here is where we exclude the events from contributing to the model (for the rows that correspond to the event times)
(there is likely a better way)
(there is likely a better way)
We fit a pooled logit model (given some input design matrices) and then generate predictions. To lag, we simply add a row of 1's at the top of the predicted Pr of uncensored and drop the last row
We fit a pooled logit model (given some input design matrices) and then generate predictions. To lag, we simply add a row of 1's at the top of the predicted Pr of uncensored and drop the last row
The following is some Python code that does this process. First, is the setup
The following is some Python code that does this process. First, is the setup
The Normal CDF = 0.5 * (1 + erf([x-mu] / [sigma*sqrt(2)]) so that's where the input expression comes from
The Normal CDF = 0.5 * (1 + erf([x-mu] / [sigma*sqrt(2)]) so that's where the input expression comes from