Command Reference : Function Reference : Function Reference: O
  
 
@obsid
Sequential index for observation in workfile.
Syntax: @obsid
Return: series
Return the sequentially assigned observation number for each observation in the workfile.
The observation index is panel aware. For panel workfiles, the observation numbers are not associated with any particular value of within cross-section identifiers.
Examples
wfcreate a 2001 2022
series ids = @obsid
returns a series with sequential values 1 to 22.
smpl if @mod(@obsid, 5) = 0
sets the workfile sample to every fifth observation.
Cross-references
See also @obsrange, @cellid, and @crossid.