adjust_multinom_emc_omc {multibias}R Documentation

Adust for exposure misclassification and outcome misclassification

Description

adjust_multinom_emc_omc returns the exposure-outcome odds ratio and confidence interval, adjusted for exposure misclassificaiton and outcome misclassification.

Usage

adjust_multinom_emc_omc(
  data,
  exposure,
  outcome,
  confounders = NULL,
  x1y0_model_coefs,
  x0y1_model_coefs,
  x1y1_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.

x1y0_model_coefs

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

x0y1_model_coefs

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

x1y1_model_coefs

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

level

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

Details

This function uses one bias model, a multinomial logistic regression model, to predict the exposure (X) and outcome (Y). If separate bias models for X and Y are desired, use adjust_emc_omc.

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_multinom_emc_omc(
  df_emc_omc,
  exposure = "Xstar",
  outcome = "Ystar",
  confounders = c("C1", "C2", "C3"),
  x1y0_model_coefs = c(-2.86, 1.63, 0.23, 0.37, -0.22, 0.87),
  x0y1_model_coefs = c(-3.26, 0.22, 1.60, 0.41, -0.93, 0.28),
  x1y1_model_coefs = c(-5.62, 1.83, 1.83, 0.74, -1.15, 1.19)
)


[Package multibias version 1.5.1 Index]