est_ps_hdps  R Documentation 
Estimate a propensity score to a given drug exposure by
(i) selecting among other drug covariates in x
which ones to
include in the PS estimation model automatically using hdPS algorithm,
(ii) estimating a score using a classical logistic regression
with the afore selected covariates.
Internal function, not supposed to be used directly.
est_ps_hdps(idx_expo, x, y, keep_total = 20)
idx_expo 
Index of the column in 
x 
Input matrix, of dimension nobs x nvars. Each row is an observation
vector. Can be in sparse matrix format (inherit from class

y 
Binary response variable, numeric. 
keep_total 
number of covariates to include in the PS estimation model according to the hdps algorithm ordering. Default is 20. 
Compared to the situation of the classic use of hdps (i) there is only one dimension (the coexposition matrix) (ii) no need to expand covariates since they are already binary. In other words, in our situation hdps consists in the "prioritize covariates" step from the original algorithm, using Bross formula. We consider the correction on the interpretation on this formula made by Richard Wyss (drug epi).
An object with S3 class "ps", "hdps"
.
expo_name 
Character, name of the drug exposure for which the PS was
estimated. Correspond to 
.
indicator_expo 
Onecolumn Matrix object. Indicator of the drug
exposure for which the PS was estimated.
Defined by 
.
score_variables 
Character vector, names of covariates(s) selected with the hdPS algorithm to include in the PS estimation model. Could be empty. 
score 
Onecolumn Matrix object, the estimated score. 
Emeline Courtois
Maintainer: Emeline Courtois
emeline.courtois@inserm.fr
Schneeweiss, S., Rassen, J. A., Glynn, R. J., Avorn, J., Mogun, H., Brookhart, M. A. (2009). "Highdimensional propensity score adjustment in studies of treatment effects using health care claims data". Epidemiology. 20, 512–522, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1097/EDE.0b013e3181a663cc")}
set.seed(15)
drugs < matrix(rbinom(100*20, 1, 0.2), nrow = 100, ncol = 20)
colnames(drugs) < paste0("drugs",1:ncol(drugs))
ae < rbinom(100, 1, 0.3)
pshdps2 < est_ps_hdps(idx_expo = 2, x = drugs, y = ae, keep_total = 10)
pshdps2$score_variables #selected variables to include in the PS model of drug_2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.