Hi folks,
Apologies in advance for the rookie question!
I am designing a nested case-control study using electronic health data and would like some help with matching using the stset + sttocc command.
The cohort data is a dynamic cohort study with individuals entering and exiting the study at different dates (they have different start dates).
My failure event is the development of a disease (inflammatory bowel disease).
I have worked out how to match for "calendar time" and separately for "analysis time" using stset and sttocc.
For calendar time:
stset end, failure(event) enter(start) origin(date - in my study 01,01,2000) id(patid) scale(365.25)
set seed 9123456
sttocc, n(6) nodots
For analysis time:
stset end, failure(event) enter(start) origin(start) id(patid) scale(365.25)
set seed 9123456
sttocc, n(6) nodots
However, I would like my controls to be matched not only for analysis time but additionally for calendar time (i.e. each control has the same (or greater) follow up as their matched case over the same calendar period). Is there a way to do this?
Many thanks,
Tommy.
Related Posts with sttocc matching for both analysis time and calendar time - nested case control study
Control variables for difference-in-differenceHi all, I have been struggling to get help on this I have sales data during an intervention (the i…
Different results for weighted median using same Stata Manual Methodology [Stata/SE 15.0]Hello everyone, I found something about weighted medians in Stata/SE. To my knowledge and what I ha…
Fama MacBeth with rolling betasHello, I would like to run a Fama-MacBeth regression with time varying betas and risk prices. I hav…
nicelabels downloadable from SSCThanks as ever to Kit Baum, a new package nicelabels is now downloadable from SSC. It may be thought…
Help: Generating a new variable on a subsampleHello! I am a beginner in Stata. My problem: I have a selection of countries in my dataset and I w…
Subscribe to:
Post Comments (Atom)
0 Response to sttocc matching for both analysis time and calendar time - nested case control study
Post a Comment