ardsiiitmg
2012-Jan-10 10:04 UTC
[R] Propensity score matching in R using Classification tree method
I can able to calculate the propensity score using classification tree method. And if i am trying to find the PS matching i am getting error.(Error in Match(Y = Y, Tr = Tr, X = ps0) : length(Y) != length(Tr)) Propensity score matching: library("rgenoud") library("Matching") data("Passport") attach("Passport") Y<-Passport$A3 Tr<-Passport$fserv_cd rr1<-Match(Y=Y, Tr = Tr, X= glm1$fitted) [in above command i am getting Error in Match(Y = Y, Tr = Tr, X = ps0) : length(Y) != length(Tr)] Matchbalance(fserv_cd~ A4,match.out=rr1,nboots=1000,data=Passport) Please suggest me right approach for Propensity score matching using classification trees(if possible code me) . ps0-propensity score values -- View this message in context: http://r.789695.n4.nabble.com/Propensity-score-matching-in-R-using-Classification-tree-method-tp4281605p4281605.html Sent from the R help mailing list archive at Nabble.com.
Frank Harrell
2012-Jan-10 13:43 UTC
[R] Propensity score matching in R using Classification tree method
A single tree will undermatch subjects. Frank ardsiiitmg wrote> > I can able to calculate the propensity score using classification tree > method. > And if i am trying to find the PS matching i am getting error.(Error in > Match(Y = Y, Tr = Tr, X = ps0) : length(Y) != length(Tr)) > > Propensity score matching: > library("rgenoud") > library("Matching") > data("Passport") > attach("Passport") > > Y<-Passport$A3 > Tr<-Passport$fserv_cd > rr1<-Match(Y=Y, Tr = Tr, X= glm1$fitted) > [in above command i am getting Error in Match(Y = Y, Tr = Tr, X = ps0) : > length(Y) != length(Tr)] > > Matchbalance(fserv_cd~ A4,match.out=rr1,nboots=1000,data=Passport) > > Please suggest me right approach for Propensity score matching using > classification trees(if possible code me) . > ps0-propensity score values >----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Propensity-score-matching-in-R-using-Classification-tree-method-tp4281605p4281981.html Sent from the R help mailing list archive at Nabble.com.