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
combining dotplot graphsI can't succed in combining dotplot graphs: I have there distinct groups of observations, marked wit…
Expression for something to not be in a listSuppose I have a local macro which is a list of values; let us call it "values". Then suppose that I…
Human opportunity indexHuman opportunity index Hi, I am trying to apply below mentioned HOI syntax on education data to ch…
How to make categories using standardized variable and its standard deviationI am interested in making categories(Large, small, medium) based on the log of [/CODE]market value o…
commandsMy name is Alex Kinuthia, a graduate student in Egerton University pursuing a Master Degree in Agrie…
Subscribe to:
Post Comments (Atom)
0 Response to How to compare list of dates to a reference date within each observation
Post a Comment