Compute the estimate of the weighted mean parameter based on estimated PMF in each treatment arm.
estimate_wmean(
pmf_est,
treat,
out,
out_levels,
out_weights,
treat_prob_est,
return_cov = TRUE
)List of treatment-specific PMF estimates.
A numeric vector containing treatment status. Missing
values are not allowed unless the corresponding entry in out is also missing.
Only values of 0 or 1 are treated as actual treatment levels. Any other value is assumed
to encode a value for which the outcome is missing and the corresponding outcome value is
ignored.
A numeric vector containing the outcomes. Missing outcomes are
allowed.
A numeric vector containing all ordered levels of the
outcome.
A vector of numeric weights with length equal to the length
of out_levels.
Estimated probability of treatments, output from call
to estimate_treat_prob.
If TRUE the estimated covariance matrix is returned.
List with estimates of treatment-specific means and difference in means.
If return_cov = TRUE, also includes covariance matrix estimates.