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
Panel data questionDear, For my master thesis, I need to do a regression to analyse the effects of climate change on t…
Cannot evaluate a nlcom ratio after an mlogit estimationHi all, I am trying to get a valuation of a nonlinear expression of my estimated parameters from a …
Double Reshape With Excel File?Hey everyone. I'm working with quite the interesting excel file. Let's load it, shall we? Code: cle…
grinset command to create inset plots available from SSCI always thought that there was no easy way to place a small graph on top of another graph in Stata,…
Simple regressionHi all, I want to look at which sectors have a siginificant impact on total trade between two count…
Subscribe to:
Post Comments (Atom)
0 Response to How to compare list of dates to a reference date within each observation
Post a Comment