Compute a BCa bootstrap confidence interval for the weighted mean. The code is based on the slides found here: http://users.stat.umn.edu/~helwig/notes/bootci-Notes.pdf
bca_marg_dist(
treat,
covar,
out,
nboot,
treat_form,
out_levels,
out_form,
out_model,
marg_cdf_est,
marg_pmf_est,
alpha = 0.05
)
A numeric
vector containing treatment status. Should only assume
a value 0 or 1.
A data.frame
containing the covariates to include in the working
proportional odds model.
A numeric
vector containing the outcomes. Missing outcomes are
allowed.
Number of bootstrap replicates used to compute bootstrap confidence intervals.
The right-hand side of a regression formula for the working model of treatment probability as a function of covariates
A numeric
vector containing all ordered levels of the
outcome.
The right-hand side of a regression formula for the working proportional odds model. NOTE: THIS FORMULA MUST NOT SUPPRESS THE INTERCEPT.
Which R function should be used to fit the proportional odds
model. Options are "polr"
(from the MASS
package),
"vglm" (from the VGAM
package), or "clm"
(from the ordinal
package).
Point estimate of treatment-specific CDF.
Point estimate of treatment-specific PMF.
Level of confidence interval.
List (cdf
, pmf
) of lists (treat=1
, treat=0
) of
confidence intervals for distributions.