From fd6c1efe067ff4a2a856d14ffc132d8851b580a8 Mon Sep 17 00:00:00 2001 From: corentinchoisy Date: Mon, 26 May 2025 17:01:17 +0200 Subject: [PATCH] Corrected bug in iptw function --- R/iptw.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/iptw.R b/R/iptw.R index fad7726..317381a 100644 --- a/R/iptw.R +++ b/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)