-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using long format for bal.tab
#86
Comments
Hi Maël, Thanks for reaching out. I'm glad my packages have been helpful. Unfrtounatelky I don't have time to write too long of an answer for you, but there is a long version of it. There are a few reasons why I made this choice.
This procedure requires a weight for each individual at each time point. This is equivalent to performing the "wide" analysis once for each time point. You can actually do this manually by creating wide datasets at each time point and assessing balance as usual. To do this, for treatment time I don't plan to put this in I am open to changing this in the future, especially if I start to see a demand and use case for these methods. I have a bias toward public health and medical applications, where TSCS data is used less often (and typically goes by a different name). It might be that in political science or economics these methods have the potential to be more popular. Right now, I see most citations for Blackwell & Glynn (2018) are methodological papers proposing different methods. Noah |
Hello, and thank you for the great work on this package. I would like to perform covariate balancing from inverse probability weights constructed with the
ipw
package to perform a marginal structural model.ipw
accepts long data, and returns a long data set too, with one weight for each observation-time pair.Take this example (taken from https://www.andrewheiss.com/blog/2020/12/03/ipw-tscs-msm/):
The way I have been using IPW in
WeightIt
andcobalt
so far has always been through wide data sets, with one weight for each observation, computed as a product of the observation-time weights.I feel like using a long data set could help improve the weights, especially when many periods are observed. I've also seen elsewhere (mostly here) that one could use multilevel or GEE models to leverage long data sets.
My question is whether
bal.tab
can accommodate this type of data set? i.e., using a long data set, where each row is an observation-time, and where the formula is repeated across all preceding time points. And if not, why was the choice to only include weights aggregated at the individual-level, irrespective of time?Maybe adding an interaction with the time variable could help
The text was updated successfully, but these errors were encountered: