prioritize_covariates: prioritize_covariates

Description Usage Arguments Details Value Author(s) References

Description

Returns the indexes of columns covars ordered by the possible amount of counfounding each column could adjust for.

Usage

1
2
prioritize_covariates(outcome, treatment, covars, return_bias = FALSE,
  keep_NaNs = FALSE)

Arguments

outcome

binary vector of outcomes

treatment

binary vector of treatments

covars

matrix or data.frame of binary covariates.

return_bias

Should the calculated multiplitive biases be returned with the ordered indexes? Defaults to FALSE

keep_NaNs

If the calculated multiplicitive bias for a covariate is NaN, should its index be included in the returned vector? Defaults to FALSE

Details

For each covariate in covars, the potential multiplicitive bias is calculated as described in Schneeweiss et al. (2009). The column indexes are then put in descending order of the absolute value of the log of the multiplicitive bias.

If return_bias==TRUE, the returned vector of indexes includes the multiplicitive biases sorted in the same order and stored in an attribute called "bias_m".

If outcome has no variation for a particular value of a covariate, then the multiplicitive bias is calculated as NaN. If keep_NaNs==FALSE, then the column indexes of such covariates are not included in the returned vector.

Value

Vector of column indexes of covars.

Author(s)

Sam Lendle

References

Schneeweiss, S., Rassen, J. A., Glynn, R. J., Avorn, J., Mogun, H., & Brookhart, M. A. (2009). High-dimensional propensity score adjustment in studies of treatment effects using health care claims data. Epidemiology (Cambridge, Mass.), 20(4), 512.


lendle/hdps documentation built on May 9, 2019, 8:34 a.m.