adjust_uc_emc_sel {multibias}R Documentation

Adust for uncontrolled confounding, exposure misclassification, and selection bias.

Description

adjust_uc_emc_sel returns the exposure-outcome odds ratio and confidence interval, adjusted for uncontrolled confounding, exposure misclassificaiton, and selection bias.

Usage

adjust_uc_emc_sel(
  data,
  exposure,
  outcome,
  confounders = NULL,
  u_model_coefs,
  x_model_coefs,
  s_model_coefs,
  level = 0.95
)

Arguments

data

Dataframe for analysis.

exposure

String name of the exposure variable.

outcome

String name of the outcome variable.

confounders

String name(s) of the confounder(s). A maximum of three confounders are allowed.

u_model_coefs

The regression coefficients corresponding to the model: logit(P(U=1)) = α0 + α1X + α2Y, where U is the binary unmeasured confounder, X is the binary true exposure, and Y is the binary outcome. The number of parameters therefore equals 3.

x_model_coefs

The regression coefficients corresponding to the model: logit(P(X=1)) = δ0 + δ1X* + δ2Y + δ2+jCj, where X represents binary true exposure, X* is the binary misclassified exposure, Y is the binary outcome, C represents the vector of binary measured confounders (if any), and j corresponds to the number of measured confounders. The number of parameters therefore equals 3 + j.

s_model_coefs

The regression coefficients corresponding to the model: logit(P(S=1)) = β0 + β1X* + β2Y + β2+jC2+j, where S represents binary selection, X* is the binary misclassified exposure, Y is the binary outcome, C represents the vector of binary measured confounders (if any), and j corresponds to the number of measured confounders. The number of parameters therefore equals 3 + j.

level

Value from 0-1 representing the full range of the confidence interval. Default is 0.95.

Details

This function uses two separate logistic regression models to predict the uncontrolled confounder (U) and exposure (X). If a single bias model for jointly modeling X and U is desired use adjust_multinom_uc_emc_sel.

Values for the regression coefficients can be applied as fixed values or as single draws from a probability distribution (ex: rnorm(1, mean = 2, sd = 1)). The latter has the advantage of allowing the researcher to capture the uncertainty in the bias parameter estimates. To incorporate this uncertainty in the estimate and confidence interval, this function should be run in loop across bootstrap samples of the dataframe for analysis. The estimate and confidence interval would then be obtained from the median and quantiles of the distribution of odds ratio estimates.

Value

A list where the first item is the odds ratio estimate of the effect of the exposure on the outcome and the second item is the confidence interval as the vector: (lower bound, upper bound).

Examples

adjust_uc_emc_sel(
  df_uc_emc_sel,
  exposure = "Xstar",
  outcome = "Y",
  confounders = c("C1", "C2", "C3"),
  u_model_coefs = c(-0.32, 0.59, 0.69),
  x_model_coefs = c(-2.44, 1.62, 0.72, 0.32, -0.15, 0.85),
  s_model_coefs = c(0.00, 0.26, 0.78, 0.03, -0.02, 0.10)
)


[Package multibias version 1.5.1 Index]