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
Data ManipulationI want to replace the missing observations in HSCode variable with the previous HScode. I use the fo…
More than one change point in interrupted time-seriesDear colleagues the data below is a subset of my data that I am intending to analyse using interrupt…
Observe the jumps of (number of) observations and drop the outliersHello, I'ma beginner in Stata and I have some questions on observing the jumps of number of observ…
Using -KHB- in mediation analysis & results don't matchHi everyone, I am using the KHB command to conduct mediation analysis for a probit model. Previousl…
Removing observations within 60 minutes of initial observationI am looking to remove repeat blood tests from my dataset if taken within 60 minutes of the initial …
Subscribe to:
Post Comments (Atom)
0 Response to Flexible case-control matching command
Post a Comment