Hi all,
I am designing a nested case-control study using cohort data and would like some help with matching using the stset + sttocc command.
My failure event is the development of a disease (brain cancer).
I have worked out how to match for "sex" and "birth year" using stset and sttocc.
gen xitdate=mdy(xitmo, xitdy, xityr)
stset xitdate, failure(cns==1) id(id) scale(365.25)
set seed 9123456
sttocc, match (sex byr) n(5) nodots
list _set id _case _time sex byr, sepby(_set)
However, I would like my controls to be matched not only for sex and birth year but additionally for date of diagnosis (i.e. each control has the same date as their matched case over the same date of diagnosis).
Is there a way to do this?
Many thanks,
Ye Jin Bang.
Related Posts with stset+sttocc matching - nested case-control study
factor variables and time-series operators not allowedHi, I am trying to run the following the codes, but get the error message "factor variables and tim…
Merging datesHi, I'm trying to merge two dates variables from the same dataset, but I would like to prioritize o…
Is it possible to divide a variable by the mean across individuals for a regression???Hello, is it okay to divide each individual's value of a variable by the mean of the sample and the…
getting estimates when using bayes prefix for melogitHi Stata forum members, I need some advice on how to get estimates after fitting melogit using baye…
Assigning variable values to observations based common values of other variables...I have a data set with 3 variables: one identifies the contract number; one identifies the type of c…
Subscribe to:
Post Comments (Atom)
0 Response to stset+sttocc matching - nested case-control study
Post a Comment