R/wmean_fn.R
bca_wmean.Rd
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_wmean( treat, covar, out, nboot, treat_form, out_levels, out_form, out_weights, out_model, wmean_est, alpha = 0.05 )
treat | A |
---|---|
covar | A |
out | A |
nboot | Number of bootstrap replicates used to compute bootstrap confidence intervals. |
treat_form | The right-hand side of a regression formula for the working model of treatment probability as a function of covariates |
out_levels | A |
out_form | The right-hand side of a regression formula for the working proportional odds model. NOTE: THIS FORMULA MUST NOT SUPPRESS THE INTERCEPT. |
out_weights | A vector of |
out_model | Which R function should be used to fit the proportional odds
model. Options are |
wmean_est | The estimated weighted means + estimated covariance matrix. |
alpha | Level of confidence interval. |
matrix with treatment-specific weighted mean CIs and CI for difference.