Hi I'd like to do a logistical regression by adjusting on the propensity score. But first I'd like to match treaty and non-treaty according to propensity scores. Here's my first script:
mod_match<-matchit(Treatment~Prop.score, method = "nearest", data = Epidemio.prop,caliper = 0.05)
Here are the error messages
Error in matchit(Treatment~Prop.score, method = "nearest", data = Epidemio.prop, : Missing values exist in the data
I have therefore removed from the model all other variables except the two variables of interest that have no missing data.
mod_match<-matchit(Treatment~Prop.score,
method = "nearest", data = Epidemio.prop[c("Treatment","Prop.score")],
caliper = 0.1)
I still have error messages.
Error in weights.matrix(match.matrix, treat, discarded) : No units were matched In addition: Warning messages:
1: In max(pscore[treat == 0]) : no non-missing arguments to max; returning -Inf
2: In max(pscore[treat == 1]) : no non-missing arguments to max; returning -Inf
3: In min(pscore[treat == 0]) : no non-missing arguments to min; returning Inf
4: In min(pscore[treat == 1]) : no non-missing arguments to min; returning Inf
MatchIt(which I assume is what you've been using) in the title. Also please note that using all-caps is considered shouting. - Maurits Evers