ID cross-section-id time-series-id;
The ID statement is used to specify variables in the input data set that identify the cross section and time period for each observation.
It is vitally important that you sort your data by cross sections and by time periods within cross sections. As PROC PANEL steps through the observations in the data, it treats any change in the value of the cross section ID variable as a new cross section, regardless of whether it has encountered that value previously. If you do not sort your data, the results might not be what you expect.
To make sure that the input data set is correctly sorted, use PROC SORT to sort the input data set, and use a BY statement to list the variables exactly as they are listed in the ID statement, as in the following example:
proc sort data=a;
by csid tsid;
run;
proc panel data=a;
id csid tsid;
...
run;