Dear Friends,
I'm having a problem when trying to match data using the optimal Match. I'm
getting this message: Error in d[i, ] <- abs(d1[i] - d0) : number of items to
replace is not a multiple of replacement length
This is the code I'm using:
test=matchit(Modalidade2~Age+BMI+Education.dic.4y+Davies.Score+DM+Hypertension+Gender+Race.dic.white+Incomes.dic+Bienium+time.of.predialysis.care+
CAD+ Cancer+ Distance.from.center, data=Out.modality, method="optimal",
ratio=1, discard="both")
Nevertheless, the same code changing optimal to nearest works perfectly. Any
one could kindly try to help me with
this?test=matchit(Modalidade2~Age+BMI+Education.dic.4y+Davies.Score+DM+Hypertension+Gender+Race.dic.white+Incomes.dic+Bienium+time.of.predialysis.care+
CAD+ Cancer+ Distance.from.center, data=Out.modality, method="nearest",
caliper=0.2, ratio=1, discard="both") #Works correctly
Thanks
Thyago
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.