estimateEffectTwang: Estimate Treatment Effect

View source: R/makePPTList_mnps.R

estimateEffectTwangR Documentation

Estimate Treatment Effect

Description

Estimate Treatment Effect

Usage

estimateEffectTwang(
  out,
  dep = "",
  time = "",
  status,
  stop.method = "es.mean",
  adjustCovar = FALSE,
  method = "GBM"
)

Arguments

out

An object of class ps

dep

Name of dependent variable

time

Name of time variable

status

Name of status variable

stop.method

A method or methods of measuring and summarizing balance across pretreatment variables.

adjustCovar

logical

method

Method of PS estimate. One of c("GBM","lm","glm","chisq").

Examples

library(twang)
data(AOD)
## Not run: 
out=mnps(treat ~ illact + crimjust + subprob + subdep + white,data = AOD,
stop.method=c("es.mean","ks.mean"),verbose=FALSE,n.trees = 3000)
estimateEffectTwang(out,dep="suf12")
out1=mnps(treat ~ illact + crimjust + subprob + subdep + white,data = AOD,
estimand="ATT",treatATT="community",stop.method=c("es.mean","ks.mean"),verbose=FALSE,n.trees = 3000)
estimateEffectTwang(out1,dep="suf12")
data(cancer,package="survival")
out=mnps(rx~nodes+differ+adhere+obstruct+surg+extent+node4,data=colon,verbose=FALSE,n.trees=3000)
result=estimateEffectTwang(out,dep="status",time="time",status="status")
summary(result)
estimateEffectTwang(out,dep="status")

## End(Not run)

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