Is there an internal flag that is accessible to a user written
function that specifies the type of dataset being used - eg cross
section, time series, panel? If the panel command is issued for a
time series dataset, it generates an error message saying (roughly)
that the command is only valid for a panel dataset.
I would like to be able to carry out the same test in a function so
as to terminate the function in an informative manner rather than
generating potentially confusing messages from internal commands. I
thought about testing $unit but that generates its own message if the
dataset is not a panel.
One way of doing this would be to extend the current set of isxxx
functions or to add an accessor $datatype which would return a number
or string reflecting the type of dataset.
Gordon