Command Reference : Function Reference : Function Reference: C
  
 
@crossid
Panel workfile series containing cross-section identifier (index) for observation.
Syntax: @crossid
Return: series
Returns the index of the cross-section identifier for each observation in the workfile.
In a panel workfile, the index numbers identify the cross-section.
In a non-panel workfile, there is a single cross-section, so the function returns 1.
Examples
wfcreate a 2001 2022 10
series ids = @crossid
returns a series with integer index values identifying the cross-section.
If you have an unbalanced panel,
series ids = @crossid
ids.freq
displays a one-way tabulation of the cross-section ids, so that you can see the number of observations in each cross-section.
Cross-references
See also @obsrange, @cellid, and @obsid.