Closed ghost closed 9 years ago
This is on my to do list. I had planned to write a function to allow the user to change out a column. I had in mind the term
column so that I could put in variable labels, or something more readable than factor(am)
, but I can make generic enough that it works for any column in the table.
And done.
dust(fit) %>%
sprinkle(cols = 1,
replace = c("Intercept", "Quarter Mile", "Transmission",
"Weight", "Four Gear", "Five Gear")) %>%
sprinkle(cols = 2:5, round = 3)
term estimate std.error statistic p.value
1 Intercept 9.365 8.373 1.118 0.274
2 Quarter Mile 1.245 0.383 3.252 0.003
3 Transmission 3.151 1.941 1.624 0.117
4 Weight -3.926 0.743 -5.286 0
5 Four Gear -0.268 1.655 -0.162 0.873
6 Five Gear -0.27 2.063 -0.131 0.897
Great!
So for substituting std.errors I would do
sprinkle(cols = 2, replace = c(1, 2, 3, 4, 5, 6))
?
Sure, one would substitute t statistic and p.value as well, as all of them are related.
I think you would want sprnkles( cols = 3, replace = c(1, 2, 3, 4, 5, 6))
. (the SE's are in the third column), and for all three columns sprinkle(cols = 3:5, replace=c(se1:se6, t1:t6, p1:p6))
(excuse my psuedocode)
Have not found that feature but would find it very useful: exchanging the standard SEs, t- and p-values e. g. from regression modells by user specified values (derived by e. g. robust methods (e. g. package
sandwich
)). Formatting packages likestargazer
support such substitutions.