psrwe_est | R Documentation |
Estimate propensity scores using logistic regression or random forest model.
psrwe_est( data, ps_fml = NULL, ps_method = c("logistic", "randomforest"), v_covs = "V1", v_grp = "Group", cur_grp_level = 1, v_arm = NULL, ctl_arm_level = NULL, stra_ctl_only = TRUE, nstrata = 5, ... )
data |
Data frame with group assignment and covariates. |
ps_fml |
Propensity score (PS) formula. If |
ps_method |
Method to calculate propensity scores. Can be set to
|
v_covs |
Column names corresponding to covariates. |
v_grp |
Column name corresponding to group assignment. |
cur_grp_level |
Group level for the current study. Default is
|
v_arm |
Column name corresponding to arm assignment. |
ctl_arm_level |
Arm level for the control arm. Ignored for single-arm studies. |
stra_ctl_only |
Create strata by control arm patients only. Default
|
nstrata |
Number of PS strata to be created. |
... |
Additional parameters for calculating the propensity score to be
used in |
A list of class PSRWE_DAT
with items:
dataOriginal data with column _ps_
for estimated PS scores
and _strata_
for PS stratum added.
ps_fmlPS formula for estimated PS scores.
is_rctWhether the current study is a randomized study.
nstrataNumber of strata.
data(ex_dta) psrwe_est(ex_dta, v_covs = paste("V", 1:7, sep = ""), v_grp = "Group", cur_grp_level = "current")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.