View source: R/makePPTList_mnps.R
estimateEffectTwang | R Documentation |
Estimate Treatment Effect
estimateEffectTwang(
out,
dep = "",
time = "",
status,
stop.method = "es.mean",
adjustCovar = FALSE,
method = "GBM"
)
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"). |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.