Dear Statalister,
I'm working on a project where I have to match records from cases and controls using a longitudinal database. All individuals are HIV seroconverters, meaning that they enter the risk set at the moment of HIV infection. Cases are those who got infected with another virus during follow-up, controls remained HIV-monoinfected throughout follow-up.
Now I need to match records from cases with control at the moment they became infected with another virus relative to HIV-seroconversion; meaning that the matching needs to take place at an equal time point from HIV seroconversion onwards. for example: an individual got infected with another virus 2 years after HIV seroconversion, so I need to find one or more controls that have records from 2 years after HIV seroconversion onwards.
Is there a simple way to do this? Do you have any recommendations?
Until now I have generated a variable that points out which cases have equal records, so for example everyone with a record 2 years after HIV seroconversion has an unique identifier number (variable called match). But I dont know how to match it now with HIV-monoinfected as cases can have a same identifier (same match number) while they can't be controls of each other.
Any tips are welcome.
Thank you in advance for your help.
Best, Daniela.
I'm working on a project where I have to match records from cases and controls using a longitudinal database. All individuals are HIV seroconverters, meaning that they enter the risk set at the moment of HIV infection. Cases are those who got infected with another virus during follow-up, controls remained HIV-monoinfected throughout follow-up.
Now I need to match records from cases with control at the moment they became infected with another virus relative to HIV-seroconversion; meaning that the matching needs to take place at an equal time point from HIV seroconversion onwards. for example: an individual got infected with another virus 2 years after HIV seroconversion, so I need to find one or more controls that have records from 2 years after HIV seroconversion onwards.
Is there a simple way to do this? Do you have any recommendations?
Until now I have generated a variable that points out which cases have equal records, so for example everyone with a record 2 years after HIV seroconversion has an unique identifier number (variable called match). But I dont know how to match it now with HIV-monoinfected as cases can have a same identifier (same match number) while they can't be controls of each other.
Any tips are welcome.
Thank you in advance for your help.
Best, Daniela.
Comment