pageunstack requires sorted obs_id, somewhat to my surprise
Posted: Thu Mar 10, 2011 6:57 am
Recently I encountered a problem when using pageunstack produced a nonsensical panel_wide page
The following seems to be the case (please confirm)
- pageunstack creates an erroneous wide page if the obs_id is not sorted
- on the pageunstack help page there doesn't seem to be a hint that the obs_id should be sorted
- no error message is produced if the obs_id is not sorted
- note: there is no problem if an EViews generated dateid is used as obs_id because pagestruct sorts the page when the dateid series is created when encountering @date(series_name), there is no comparable sort by cross section ID series
Did I miss something or is this a source for quite serious errors.
Attached you find a Exel-Data and an EViews program for illustration.
The following seems to be the case (please confirm)
- pageunstack creates an erroneous wide page if the obs_id is not sorted
- on the pageunstack help page there doesn't seem to be a hint that the obs_id should be sorted
- no error message is produced if the obs_id is not sorted
- note: there is no problem if an EViews generated dateid is used as obs_id because pagestruct sorts the page when the dateid series is created when encountering @date(series_name), there is no comparable sort by cross section ID series
Did I miss something or is this a source for quite serious errors.
Attached you find a Exel-Data and an EViews program for illustration.