check_weights | R Documentation |
This function checks to see if the optimization is done properly
by checking the covariate averages before and after adjustment.
In case of ties when calculating median,
we return the mean of the two numbers. For more details,
see ties
parameter in matrixStats::weightedMedian.
check_weights(weighted_data, processed_agd)
## S3 method for class 'maicplus_check_weights'
print(
x,
mean_digits = 2,
prop_digits = 2,
sd_digits = 3,
digits = getOption("digits"),
...
)
weighted_data |
object returned after calculating weights using |
processed_agd |
a data frame, object returned after using |
x |
object from check_weights |
mean_digits |
number of digits for rounding mean columns in the output |
prop_digits |
number of digits for rounding proportion columns in the output |
sd_digits |
number of digits for rounding mean columns in the output |
digits |
minimal number of significant digits, see print.default. |
... |
further arguments to print.data.frame |
data.frame of weighted and unweighted covariate averages of the IPD,
average of aggregate data, and sum of inner products of covariate x_i
and the weights (exp(x_i\beta)
)
print(maicplus_check_weights)
: Print method for check_weights objects
data(weighted_sat)
data(agd)
check_weights(weighted_sat, process_agd(agd))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.