[R] (no subject)

dirk567 at gmx.de dirk567 at gmx.de
Fri Apr 3 16:11:33 CEST 2009


Dear R users,

I am trying to do exact matching on a large dataset (500.000 obs), about equal size of treatment and controll group, with replacement: As for the moment I use the "Match" function of the "Matching" library. I match on 2 covariates and all observations in the treatment group have at least one exact counterpart in the controllgroup. Now I want to introduce observation weights. I set ties=FALSE, as I want exactly one by one matching: Is there a way which makes that I draw randomly from the individuals in the controllgroup which have the same values of covariates as the individual in the treatmentgroup, setting the probabilities to be drawn proportional to the weights of the individual in the CT? E.g. I have three individuals which all have the same value for the covariates as the one observation I want to find a partner for, and the first of the three individuals has a very large weight: Now when drawing randomly among those three I want the probability that the first one is drawn to be very large.

I'd really appreciate any suggestions: the "weights" option does not do the job, this seems to work only if setting "ties=TRUE"



Thanks
Dirk
--




More information about the R-help mailing list