compute_ipw: Estimation of Inverse Probability Weighting

Description Usage Arguments

View source: R/weighting.R

Description

estimates inverse probability weighting (IPW) based on propensity score estimates

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
compute_ipw(
  data,
  treatment,
  trt_indicator = 1,
  outcome,
  weight = NULL,
  object = NULL,
  formula = NULL,
  method = c("logit", "rf", "cart", "SVM"),
  mc_col = NULL,
  sc_col = NULL,
  parallel = FALSE,
  ...
)

Arguments

data

A data frame to be used

treatment

Treatment variable name

trt_indicator

Value that indicates the unit is treated

outcome

Outcome variable name

weight

If weighting column exists, it can be specified for computing efficiency

object

A propmod object if already fitted.

formula

If not, write a formula to be fitted. Remember that you don't have to worry about group variable. .SD do exclude by.

method

Estimating methods

  • "logit" - ps_glm

  • "rf" - ps_rf

  • "cart" - ps_cart

  • "SVM" - ps_svm

mc_col

Indicator column name for MC simulation if exists

sc_col

Indicator column name for various scenarios if exists

parallel

parallelize some operation

...

Additional arguments of fitting functions


ygeunkim/propensityml documentation built on Jan. 1, 2021, 1:44 p.m.