make_phr_table1.Rd
Takes either a data.frame
or an ipw
object and cycles through all of the given
variables and computes summary statistcs across levels of treatment. Standardized
mean difference and a distribution plot can also be added to the plot.
make_phr_table1(
obj,
...,
treat = NULL,
use_treat_vars = FALSE,
tab_stat = "Mean",
tab_stat2 = "SD",
smd = F,
round = 2,
side.by.side = F,
totaln = T
)
Either a cmprisk
object or a data.frame
, if a data.frame
then a treatmet variable must
be specified if it is to be used
The covariates to be used in the table
The stratifying/treatment variable. If the obj is a data.frame then treat is the first variable specified after the obj, whereas if it is an ipw object, then the treatment variable was previously specified in the model.
In addition to variables passed by the user, also include variables from treatment model in table
The type of statistic you want reported for continuous variables, options should be either "Mean" (default) or "Median"
The secondary statistic, options should be either "SD" (default) for standard deviation, "CI" for confidence intervals, or "IQR" for inter-quartile range of the median
Should the standardized mean difference be displayed default = F
The number of decimals results should be displayed
Should both the unweighted and weighted estimates be presented in the same table, defaults to F, not available for non, ipwrisk objects
Should n = be presented for each stratified group, defaults to T
Returns a dataframe
object