check_weights: Check to see if weights are optimized correctly
Description
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.
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)\))
Arguments
weighted_data
object returned after calculating weights using estimate_weights
processed_agd
a data frame, object returned after using process_agd or
aggregated data following the same naming convention
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.