dscolby / CausalELM.jl

Taking causal inference to the extreme!
https://dscolby.github.io/CausalELM.jl/
MIT License
23 stars 0 forks source link

Calculate p-values for ITS using alternative type of permutation #15

Closed dscolby closed 11 months ago

dscolby commented 11 months ago

The current permutation test for p-values using ITS estimates the null distribution by using alternative cutoff points for pre and post-intervention periods. Instead, we should permute the order of the post-treatment observations to estimate null effects and use those estimated effects under permuted post-treatment observations to estimate the null distribution.

As a reminder, we can easily create permutations using a[shuffle(1:end), :].

dscolby commented 11 months ago

This is not quite correct. A better way is to repeatedly randomly assign observations to the pre or post-intervention period and estimate the causal effect to generate a null distribution.