Hello,
First, thanks in advance for anyone who can help me with this. I haven't had much luck recently with other avenues so I hoped I might find some advice here.
I'm performing a case-control analysis on a dataset of mine in which I want to match 2 controls to 1 case based on a date value (matched on day). To increase the power I'm trying to add some flexibility by allowing controls to be matched +/- 1 day, rather than only on the specific day. For example, if I have 1 case whose date is 06/29/2018, and there's only 1 control who shares that specific date, I want to be able to match a second control whose date is either 06/28/2018 or 06/30/2018.
Variables:
case (binary, 0 or 1)
date (str11, format is mm/dd/yyyy)
I'm using the ccmatch command, which does match entries on one variable based on a given set of other variables. However it does not match multiple controls to a case and doesn't account for flexible matching criteria like mine.
The only way I can do this now is by painstakingly poring through the (rather large) dataset and individually matching a second control to each identified case, and since ccmatch matches 1:1 at random, such additional code is difficult to replicate.
Let me know if any more information is needed, I'm happy to explain myself better. This is my first post so apologies if I've made an error with this post.
Related Posts with Flexible case-control matching command
SOEP weightingHi, I am new to STATA and have a project where I use SOEP data. I would like to calculate a weighted…
reshape or what?Dear All, I have this dataset, Code: * Example generated by -dataex-. To install: ssc install data…
Help for organising dataHi there I have monthly data of many users and of their behaviour. How can I create groups of peopl…
Graph bar with custom labelsDear Statalist I have been struggling with the following issue for quite a while now. Unfortunately…
How to generate 2 yaxis graph with 2 xaxis group with SD?I have the information here, on the table weeks ISpre A1M B2M sdis sdam sdbm group hiISpre lo…
Subscribe to:
Post Comments (Atom)
0 Response to Flexible case-control matching command
Post a Comment