I have a large sequential data set. I have identified a small subset of extreme observations in the set. What I want to do is extract the extreme observations and the 10 observation before and after each extreme observations. If that is possible, I would also like to ensure that duplicates are removed as well. And ideally, since I have by variables, I would love to be able to abide by the first.var and last.var parameters so as not to include an obs from a different by variable within the range. Can anyone help?
... View more