estimateEffectContinuous: estimate effect based on IPW(inverse probability weight)

View source: R/estimateEffectContinuous.R

estimateEffectContinuousR Documentation

estimate effect based on IPW(inverse probability weight)

Description

estimate effect based on IPW(inverse probability weight)

Usage

estimateEffectContinuous(
  data,
  dep,
  xvars = NULL,
  treatvar = NULL,
  seed = 1234,
  probs = 0.1 * (1:9),
  num = 10000,
  weights = NULL
)

Arguments

data

A data.frame as a result of addIPW()

dep

Name of dependent variable

xvars

Names of covariates

treatvar

Name of treatment var

seed

A single integer

probs

numeric vector of probabilities with values in [0,1].

num

an integer specifying the number of simulations to compute

weights

Name of weight variable

Examples

mydata=addIPW(treat~x1+x2,data=simData2)
estimateEffectContinuous(mydata,dep="y",weights="IPW")
## Not run: 
estimateEffectContinuous(mydata,dep="y")
data(lalonde,package="MatchIt")
mydata1=addIPW(age~educ+race+married, data=lalonde)
estimateEffectContinuous(mydata1,dep="re78",weights="IPW")

## End(Not run)

cardiomoon/webrPSM documentation built on Feb. 2, 2024, 3:55 a.m.