I'm trying to un-merge a dataset. More specifically, I have a dataset with variables:
PersonID
EventID (there can be multiple events per person)
a number of person-level variables that are constant within personID
a number of event-level variables that can vary within personID
I would like to end up with a person-level file, with one record per personID, including all the person-level variables. I could do this manually by just selecting on first.personID and keeping the person-level variables. But there are a large number of variables, and it is not obvious which are person and which are event level. Is there an easy way to identify which variables are fixed within personID, and keep only these in the output file. (They are a mix of numeric and character).
... View more