[R] matchit - can I weight the parameters?

Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST) calum.polwart at nhs.net
Wed Jun 20 01:36:53 CEST 2012


This may be a really obvious question but I just can't figure out how to do it.

I have a small dataset that I am trying to compare to some controls.  It is essential that the controls are matched on Cancer Stage (a numerical factor between 1 and 4), and then ideally on Age (integer), Gender (factor), Performance Status(factor).

I'm using matchit to try and do this, but it seems to give equal priority to all my variables so I can be relatively well matched on Age, Sex and PS but not exactly matched on Stage.  Stage is the biggest influence on outcome... so I must match it as close to perfect as possible even if that means dropping some data from the 'treatment' group.

Here's some code:

match = matchit(Group ~ Stage + Age + Gender + PS, myData, method="optimal")
matchedData = match.data(match)
by (matchedData$Stage, matchedData$Group, table)

matchedData$GP: 0

 1 3A 3B  4
 1  6   9  10
--------------------------------------------------------------------------------------------------------
myreData$GP: 1

 1 3A 3B  4
 1  3   9  13

Can anyone point me to a method that tells R to prioritise Stage over the others?
Thanks in advance

********************************************************************************************************************

This message may contain confidential information. If yo...{{dropped:19}}



More information about the R-help mailing list