Yes, the variable has to be 0-1 I think.
Kosuke
Department of Politics
Princeton University
On Nov 7, 2012, at 1:53 PM, "Buckner-Petty, Skye" <SBUCKNER(a)dom.wustl.edu>
wrote:
Hi Kosuke,
I am doing some analysis that requires matching and recently come across your package.
However, when trying to run the following code, I get an error:
bbb= matchit(formula = compLbl ~ Age + Race_Code
+ Complexity_Subclass_Code, data = nData, method = "nearest")
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
The variable “compLbl” is dichotomous (group A and group B), but it is not binary coded
(1s and 0s). Does the treatment variable need to be binary coded in order for it to
work?
Thanks,
Skye Buckner-Petty
Statistical Data Analyst
GMS
Department of Medicine
Office – (314) 362 4185
FAX – (314) 454 5113
Cell – (314) 732 3030
HIPAA: The materials in this e-mail message are private and confidential and may also
contain protected healthcare information. If you are not the intended recipient, be
advised that any unauthorized use, disclosure, copying or the taking of any action in
reliance on the contents of this information is strictly prohibited. If you have received
this e-mail in error, please immediately notify the sender via telephone or return
e-mail.