Hi Statalist,
I have a large matched cohort data set where exposed have been matched 1:m with an unexposed group (siblings). One exposed can have multiple matched siblings (e.g. 1-10 siblings).
My matching variable indicator is called set_id.
The set_id variable has 9,859 unique values.
- No. of exposed = 9,859
- No. of unexposed/siblings = 17,220
How do I keep this matching when I drop some study subjects that are not relevant for my specific study (e.g. exclude individuals with observations before a given year)?
- If I drop any exposed individuals, all of their matched siblings should also be dropped.
- Conversely, if I drop any siblings, cases should only be dropped if there is no other matched sibling for this matched pair.
How do I write a Stata code that condition on this?
Thanks a lot in advance.
Related Posts with Consider matched pairs when dropping study subjects
Calculate export times using custom data HTML Code: clear input str10 company_name str3 country int year "3Mcompany" "USA" 2002 "3Mcompany"…
Need help for displaying bar labels for mean values using <cibar>Hi all, I am working on a replication assignment and I am using the ssc package cibar to to generat…
Reshape long 1 row dataset with no identifierHi, I am trying to reshape long the following dataset: Code: * Example generated by -dataex-. To i…
A function for a numberHi, I am writing a loop that looks like this foreach code of numlist 1/202{ forvalues i=1940/2020{ …
Export covariance matrix to ExcelHi, I would like to export the following covariance matrix to excel: Code: * Example generated by…
Subscribe to:
Post Comments (Atom)
0 Response to Consider matched pairs when dropping study subjects
Post a Comment