tidy.xbal | R Documentation |
broom::tidy()
/glance()
methods for balanceTest()
resultsPortion out the value of a balanceTest()
call in a manner consistent
with assumptions of the broom package.
tidy.xbal(
x,
strata = dimnames(x[["results"]])[["strata"]][1],
varnames_crosswalk = c(z = "statistic", p = "p.value"),
format = FALSE,
digits = max(2, getOption("digits") - 4),
...
)
glance.xbal(x, strata = dimnames(x[["results"]])[["strata"]][1], ...)
x |
object of class |
strata |
which stratification to return info about? Defaults to last one specified in originating function call (which appears first in the xbal array). |
varnames_crosswalk |
character vector of new names for xbal columns, named by the xbal column |
format |
if true, apply |
digits |
passed to |
... |
Additional arguments passed to |
tidy.xbal()
gives per-variable
statistics whereas glance.xbal()
extracts combined-difference related
calculations. In both cases one has to specify which stratification one wants
statistics about, as xbal objects can store info about several stratifications.
tidy.xbal()
has a parameter varnames_crosswalk
not shared with
glance.xbal()
. It should be a named character vector, the elements
of which give names of columns to be returned and the names of which correspond
to columns of xbal objects' ‘results’ entry. Its ordering dictates the order
of the result. The default value translates between conventional xbal
column names and broom package conventional names.
variable name
mean of LHS variable = 0 group
mean of LHS variable = 1 group
T - C diff w/ direct standardization for strata if applicable
adj.diff/pooled.sd
pooled SD
z
column from the xbal object
p
column from the xbal object
Additional parameters beyond those listed here are ignored (at this time).
data frame composed of: for [RItools::tidy()]
, a column of variable labels (vars
) and
additional columns of balance-related stats; for [RItools::glance()]
, scalars describing
a combined differences test, if found, and otherwise NULL
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.