Corrected bug in iptw function
This commit is contained in:
2
R/iptw.R
2
R/iptw.R
@ -19,7 +19,7 @@ iptw <- function(df=NULL,Y=NULL,X=NULL,target="ate") {
|
||||
if (!("id"%in%colnames(df))) {
|
||||
stop('ERROR: no column named id provided')
|
||||
}
|
||||
if (target !="ate" & target != "att" & type !="atu")
|
||||
if (target !="ate" & target != "att" & target !="atu")
|
||||
dff <- df[,c(Y,X)]
|
||||
if (length(X)==1) {
|
||||
formu <- paste0(Y,"~",X)
|
||||
|
Reference in New Issue
Block a user