estimate_ci_wmean {drord}R Documentation

Compute confidence interval/s for the weight mean parameters

Description

Compute confidence interval/s for the weight mean parameters

Usage

estimate_ci_wmean(
  out,
  treat,
  covar,
  wmean_est,
  alpha = 0.05,
  out_levels = order(unique(out)),
  out_form = NULL,
  out_weights = rep(1, length(out_levels)),
  out_model,
  treat_form = "1",
  ci = c("bca", "wald"),
  nboot = 10000
)

Arguments

out

A numeric vector containing the outcomes. Missing outcomes are allowed.

treat

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.

covar

A data.frame containing the covariates to include in the working proportional odds model.

wmean_est

The point estimates for weighted means

alpha

Confidence intervals have nominal level 1-alpha.

out_levels

A numeric vector containing all ordered levels of the outcome.

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 numeric weights with length equal to the length of out_levels.

out_model

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).

treat_form

The right-hand side of a regression formula for the working model of treatment probability as a function of covariates

ci

A vector of characters indicating which confidence intervals should be computed ("bca" and/or "wald")

nboot

Number of bootstrap replicates used to compute bootstrap confidence intervals.

Value

List with wald and bca-estimated confidence intervals for the weighted mean parameters.


[Package drord version 1.0.1 Index]