est_ps_xgb | R Documentation |
Estimate a propensity score to a given drug exposure (treatment)
with extreme gradient boosting.
Depends on xgboost
package.
Internal function, not supposed to be used directly.
est_ps_xgb(
idx_expo,
x,
parameters = list(eta = 0.1, max_depth = 6, objective = "binary:logistic", nthread =
1),
nrounds = 200,
...
)
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
|
parameters |
correspond to |
nrounds |
Maximum number of boosting iterations. Default is 200. |
... |
Other arguments that can be passed to |
An object with S3 class "ps", "xgb"
.
expo_name |
Character, name of the drug exposure for which the PS was
estimated. Correspond to |
.
indicator_expo |
One-column Matrix object. Indicator of the drug
exposure for which the PS was estimated.
Defined by |
.
score_variables |
Character vector, names of covariates(s) used in
a at list one tree in the gradient tree boosting algorithm.
Obtained with |
score |
One-column Matrix object, the estimated score. |
Emeline Courtois
Maintainer: Emeline Courtois
emeline.courtois@inserm.fr
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)
psxgb2 <- est_ps_xgb(idx_expo = 2, x = drugs, nrounds = 100)
psxgb2$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.