Closed jgu115 closed 7 months ago
Hi Matheus,
Tried the code again, indexing array with a boolean array actually seems to work fine. Not sure what happened in my earlier tries. So this line is basically saying rotate through all the pre/post residuals and pretend they are all post resids to test statistics. This matches "permute inference" well.
Thank you, Judith
Hi Matheus,
Thank you for this chapter! I am trying to replicating the code to understand more in depth.
I have an issue on chapter Conformal Inference for Synthetic Controls, in the following paragraph block_permutations = np.stack([np.roll(u, permutation, axis=0)[post_intervention] for permutation in range(len(u))])
The line doesn't run for me due to [post_intervention]. It seems that [post_intervention] is here to serve as an index to array from np.roll(u, permutation, axis=0) ? But a list can't be served as index and I am also not clear about its purpose. if we just want post_intervention residuals , we an filter them upfront. My understanding is we actually want to permute with pre intervention.
The code ran after I took out [post_intervention] but would like to clarify if possible.
Thank you and best, Judith