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
Assigning different time values to the same dependent and control variableDear, I am trying to estimate how well the U.S. yield spread predicts future inflation. The regres…
create a table from loopsHello, I have a series of loops. Right now they are set to display, but I want them to write the dat…
Upper confidence intervalDear Statalist, How to construct an upper 95% confidence interval for the mean of scores for a subgr…
Command for calculating household level expenditureHi, I am working with the National Sample Survey Organization dataset from India. It is an individu…
double loops.Dear All, I run the following code Code: clear set obs `=40 * 500 * 10' set seed 2803 egen year…
Subscribe to:
Post Comments (Atom)
0 Response to Flexible case-control matching command
Post a Comment