the lack of convergence will happen if you have collinearity among your
covariates, which is probably the problem I'd guess.
Gary
On Tue, 20 Dec 2005, Jeanie (Jie) Na wrote:
Dear Dr. King,
Thank you for your reply regarding my questions of categorical
covariates in the model. I've recoded those covariates in format of a
set of J-1 dummies coding J categories for a nominal variable.
My number of convariates increased a lot because a few covariates had
more than a dozen of levels.
But when I use matchit, there was a warning message at the end.
m.out <- matchit(NASOTUBB ~CENTER.3 + CENTER.10 + CENTER.13 + CENTER.15
+ CENTER.17 + CENTER.19 + CENTER.21 + CENTER.22 + CENTER.23 + CENTER.34
+ CENTER.2 + CENTER.5 + CENTER.6 + CENTER.7 + CENTER.8 + CENTER.11 +
CENTER.12 + CENTER.14 + CENTER.16 + CENTER.18 + CENTER.30 + CENTER.31 +
CENTER.32 + CENTER.33 + CENTER.113 + CENTER.20 + ANAESTHC.0 + ANAESTHC.2
+ ANAESTHC.4 + ANAESTHC.6 + ANAESTHC.3 + ANAESTHC.1 + ANAESTHC.7 +
ANAESTHC.5 + ASA_R...1 + ASA_R...2 + ASA_R...3 + PREDPATC...neither.nor
+ PREDPATC...PONV + PREDPATC...no.PONV + PREDPATC...not.assessed +
OP_C...knee.arthroscopy + OP_C...cholecystectomy +
OP_C...general.surgery + OP_C...bone.surgery +
OP_C...upper.extremity.surgery + OP_C...thyroid.surgery +
OP_C...ENT.Eye.surgery + OP_C...hysterectomy +
OP_C...gynaecologic.surgery + OP_C...breast.surgery +
OP_C...hip.replacement + OP_C...hernia.repair + surg2appc...other +
surg2appc...abdominal.open + surg2appc...abdominal.laparoscopic +
WEIGHTN + BMI_N + PONV_GAB + YEAREXPN + KPONVRN ,data = matchuse, method
= "nearest", distance = "logit")
Warning message:
algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights,
start = start, etastart = etastart,
My question is : Can I still use the result from the matching? if not,
any suggestions that I can get the algorithm converges.
Thank you very much.
Jeanie
On Mon, 2005-12-19 at 14:00 -0500, Gary King wrote:
On Fri, 16 Dec 2005, Jeanie (Jie) Na wrote:
Hi Dr. King,
I am learning to use MatchIt package in R for a project I am working on.
I have a couple of questions when I read about the manual.
1) I have a few categorical variables with multiple levels and a few
continuous variables as covariates. The examples given in the manual of
MatchIt seem to have all the covariates as dichotomous or continuous. Do
I need to recode my data and give them values 1 to n (# of levels)?
It doesnt seem to be ok as of now when I have character values for those
categorical variables.
you can exact match on fully category variables. otherwise, i think you'd
want to make them into 'continuous' variables as you would right side
variables in a regression (such as a set of J-1 dummies coding J
categories for a nominal variable)
2) can you give me an example of the command if I want to use my own
distance measure? What would be the input for distance? Will it be a
distance matrix with rows for the treated,columns for the controlled,
and values are the abs(logit(propensity score of control
i)-logit(propensity score of treated j)). Or would it be a matrix with
propensity scores as one column?
the program allows you to estimate the distance based on Mahalanobis
distance or the propensity score computed in a variety of ways. if you
need different metrics you might need to explain some more about what
you're looking for.
Best of luck,
Gary King
I hope I explained myself well. Thank you very much for your advice.
--
Jeanie (Jie) Na
Programmer Analyst II _ _ ___ _ _ ____
Department of Quantitative Health Sciences [_]-[_] / - \ | |_| | (_(_
Cleveland Clinic Foundation | | ( |_| ) ) _ ( _| )
Tel: (216)4451369 [_]-[_] \_\_\ |_| |_| (___/
------------------------------------------------------------------------------
Confidentiality Note: This message is intended for use only by the individual or entity
to which it is addressed and may contain information that is privileged, confidential, and
exempt from disclosure under applicable law. If the reader of this message is not the
intended recipient or the employee or agent responsible for delivering the message to the
intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have received this
communication in error, please contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy. Thank you.
------------
Visit us online at our award-winning
http://www.clevelandclinic.org for a complete
listing of Cleveland Clinic services, staff and locations from one of the country's
leading hospitals.
==============================================================================
--
Jeanie (Jie) Na
Programmer Analyst II _ _ ___ _ _ ____
Department of Quantitative Health Sciences [_]-[_] / - \ | |_| | (_(_
Cleveland Clinic Foundation | | ( |_| ) ) _ ( _| )
Tel: (216)4451369 [_]-[_] \_\_\ |_| |_| (___/
------------------------------------------------------------------------------
Confidentiality Note: This message is intended for use only by the individual or entity
to which it is addressed and may contain information that is privileged, confidential, and
exempt from disclosure under applicable law. If the reader of this message is not the
intended recipient or the employee or agent responsible for delivering the message to the
intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have received this
communication in error, please contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy. Thank you.
------------
Visit us online at our award-winning
http://www.clevelandclinic.org for a complete
listing of Cleveland Clinic services, staff and locations from one of the country's
leading hospitals.
==============================================================================
-
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)latte.harvard.edu
Subscribe/Unsubscribe: