Skip to content
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

Reverse difference column option in iebaltab.ado #221

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

moritzpoll
Copy link

Hi IE-team, thanks again for the stellar tool kit. Got a small edit for you if you like. Currently, the difference column tests the difference of control minus treatment group. I find that counterintuitive and would rather think of it in terms of how did my treatment group differ (treatment - control). In a two-armed study, I can game that by calling my treatment group control in the control() option. But for multi-armed studies this doesn't work. If anyone has a neat trick up their sleeves for how to do it without my edit, I stand corrected (and would love to know it). In the meantime, I've added an option treatminuscontrol where the sign of the difference is switched to (what I feel) the more intuitive difference of treatment minus control group. Use with caution, only tested for my own purposes (savetex with 3 treatment arms) and I especially hope I didn't mess up the titlerow and texrow bits. Best, Moritz.

PS: Shoot, rows 2864 and 2865, and 2667 and 2668 have a row2/row3 mix-up.

Hi IE-team, thanks again for the stellar tool kit. Got a small edit for you if you like. Currently, the difference column tests the difference of control minus treatment group. I find that counterintuitive and would rather think of it in terms of how did my treatment group differ (treatment - control). In a two-armed study, I can game that by calling my treatment group control in the `control()` option. But for multi-armed studies this doesn't work. If anyone has a neat trick up their sleeves for how to do it without my edit, I stand corrected (and would love to know it). In the meantime, I've added an option `treatminuscontrol` where the sign of the difference is switched to (what I feel) the more intuitive difference of treatment minus control group. Use with caution, only tested for my own purposes (savetex with 3 treatment arms) and I especially hope I didn't mess up the titlerow and texrow bits. Best, Moritz.
@kbjarkefur
Copy link
Contributor

@moritzpoll thank you for this feedback! We are happy that you find the package useful!

This is a feedback that we have received before, but it is still important to get more votes on it as we are going back and forth on how to fix this. See for example discussion here.

We completely agree with you as my comment in the issue linked to above shows. The reason why we have not dealt with it already is backward compatibility. Meaning that code that use iebaltab should get the results even after updating to a new version. This is important for reproducibility.

One way other Stata packages have dealt with maintaining backward compatibility when creating new version of commands is to create iebaltab2, iebaltab3 etc. Our only decision we have taken so far is that we do not want to do that.

Another solution is in the line with what you suggest. Creating an option that flips the sign. This solves it, but it feels quite patchy and with too many solutions like this the package is no longer easily maintainable, meaning that it is prohibitively labor-some to make future updates.

Another solution is to simply ignore backward compatibility in this specific case. Would be the best for all future code that will use iebaltab but quite bad for any code already using it.

Other software have package management solutions where you can specify version to deal with this. pip in python, npm in java script, but we have not seen a satisfactory solution to this problem in Stata and is therefore dealing with this on a case by case basis that is time consuming.

While we are not ready to take action on this yet, we still very much appreciate your feedback as the more we here from people using this package the better we can make a decision the serve most users the best. We are planning to set aside proper time to do a complete re-write of iebaltab as it is already growing un-maintainable and this issue will definitely be a part of that.

Thanks again for your feedback!

@kbjarkefur
Copy link
Contributor

Leave this PR open. This discussion is important for when we deal with this.

If you want to make further updates to this PR (for example related to the row2/row3 mix-up) then you can push to https://github.com/moritzpoll/ietoolkit/tree/patch-2 and those commits will be included in this PR.

titlerow2 should have been titlerow3 in a few places
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants