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}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
  • [R] matc... Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST)
    • Re:... Nordlund, Dan (DSHS/RDA)
    • Re:... Nordlund, Dan (DSHS/RDA)

Reply via email to