I am using Stata/SE 15.1 with Windows OS on a dataset with 6,650 observations and 2,341 variables. I have a measure indicating the date each observation completed their probation sentence (variable name outdate) and then (up to 130) measures indicating dates of rearrests (following the first arrest; variable names offnsdte1 offnsdte2 ... offnsdte130). My goal is to identify if each observation was rearrested within 365 days of their probation completion. The issue is that each observation could have been arrested during their probation sentence, so several of the rearrest dates were before the probation completion date. Each observation can have a different number of rearrests though the dates are coded as missing for those who weren't rearrested X number of times (i.e. if someone wasn't rearrested for a 10th time, they are missing for offnsdte10). I'm at a loss of how to move forward with this-- I imagine it may involve some kind of looping code, but I'm unfamiliar with how to use it. Also, all dates are in the %tdD_m_Y format.
I hope I provided enough information but let me know if not. I appreciate any advice you may have to offer. Thanks!
Related Posts with How to compare list of dates to a reference date within each observation
Reshaping data long to wide(NSS, 64th round)Hi, The data I am detailing with pertains to the household and individual-level data from the Natio…
Using mysuest to compare coefficients from different imputationsHello everyone, I require some assistance with regard to using mysuest for the sake of comparing co…
how to export stata result to excel using table and tabstat command Sex usual_residence registered_place income_1 income_2 Male New York Washington Dc 2000 2112 …
Negative independent valuesHello, For my research I am currently investigating the effect of financial ratios on the initial r…
putexcel with dates as row namesDear All, I'm trying to compute some statistics of my sample dataset. In particular I'm interested …
Subscribe to:
Post Comments (Atom)
0 Response to How to compare list of dates to a reference date within each observation
Post a Comment