How to subset data
<p>I am using Stata and I need to subset my data. I would like to create a subset of data in which all the observations related to a unique id are maintained if in one of the observations related to the unique id meets a certain criterion. For example, I want to keep all semester observations (variable <code>recordnum</code>) related to a student (variable <code>id</code>), if in one of the semesters they were enrolled they received a aid (variable <code>aid</code>).</p>