-
Notifications
You must be signed in to change notification settings - Fork 11
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
broom-compatible form & content of balanceTest
output
#90
Comments
Without having thought this through, I suspect that we could organize things in such a way that a |
Starting a new branch for work on #90, in anticipation of commits to come that may potentially be somewhat disruptive.
Notes to self:
so that the output gets modified regardless of whether that condition holds. For an example of the problem, see tests added in [i90-broom 1f71fc0] (one of which currently fails). Fixing will call for a bit of compensatory surgery. |
balanceTest
output?balanceTest
output
Follow-ups:
Remaining to-dos:
|
If given non-null <stuff> %>%
+ tidy.xbal(format=T, digits=3)
vars Control Treatment adj.diff std.diff pooled.sd
1 grdavg13 99.7 77.7 -22.0 -0.4845 45.5
2 pctwht13 0.472 0.450 -0.0223 -0.0649 0.343
NA.info statistic p.value
1 -2.200 3.06e-01
2 (pctwht13) -0.578 1.00e+00 as compared to <stuff> %>%
tidy.xbal(varnames_crosswalk=c(Treatment="recruited", Control="other US elem", adj.\
diff="recruited - other"),format=T, digits=3)
vars std.diff pooled.sd z p
1 grdavg13 -0.4845 45.5 -2.200 3.06e-01
2 pctwht13 -0.0649 0.343 -0.578 1.00e+00
3 pctFRPlun13 0.8853 0.226 6.024 2.21e-08
NA.info recruited other US elem recruited - other
1 77.7 99.7 -22.0
2 (pctwht13) 0.450 0.472 -0.0223
3 (pctFRPlun13) 0.758 0.558 0.200 |
More to-dos (not necessary for closing out this issue):
(the last point is distinct from this issue and may eventually occasion its own.) |
(Probably merits spinning out as own issue) Resources permitting it would be nice to improve on how Date variables get presented.
Recording some notes that may be helpful to that end.
|
On Dates, one thing that is a little tricky is that Some options,
|
(Continuing my last comment above, in which I complained about It turns out that going past weeks requires grappling with some additional complications. The lubridate package does this, and perhaps we could tap into their solution. It would seem to require typing and formatting our "adj.diff" columns as " |
This could be wrapped up even while leaving the questions about Date variables for another day. |
Via the broom package, the "tidyverse" movement is pushing towards model outputs that can be summed up in terms of vectors of about the lengths of model coefficient vectors (
broom::tidy()
), of vectors of about the length of fitted values or residuals (broom::augment()
); and of whole-model summaries analogous to R^2 (broom::glance()
).Let's have tidy and glance method for
xbal
objects (and/or a successor class). Let's also arrange things so that they andprint.xbal()
share code, e.g. by havingprint.xbal()
internally call ontidy.xbal()
andglance.xbal
for some or all of the formatting embedded in the "results" and "overall" portions of the display.(In particular I've recently started to code into print.xbal special formatting rules that format by row to some extent and by column elsewhere. I think
tidy.xbal()
should emulate the unusual by-row formatting, for consistency; we might as well use the same routines in both places.)The text was updated successfully, but these errors were encountered: