Given a matrix of covarites,
identify_covariates returns the top
keep_n_covars or the indexes of those columns.
a matrix or something that can be coerced with
number of covariates to keep
Should indexes be returned? Or a subset of
Columns are sorted in descending order of
min(prevalence, 1-prevalence) where
prevalence is the the proportion of
non-zero values in a given column.
indexes==TRUE, a vector of the top
keep_n_covars column indexes is returned.
indexes==FALSE, a matrix of covariates is returned whos columns are the top
keep_n_covars colums of
covars. Columns are in their original order.
keep_n_covars >= ncol(covar), then the function returns immediately without ranking columns in terms of
prevalence as it is unecessary.
Differences from Schneeweiss et al. (2009):
Covariates that have fewer than 100 non-zero values are not automatically dropped. If typical covariates tend to have more than 100 non-zero values will typically be ranked higher than those with fewer than 100 automatically.
Indexes of identified columns or a subset of
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.