On Thu, 31 Jul 2008, Gordon Hughes wrote:
I can supplement my previous query with a report based on my
experiments, which may be an error or a feature. A skeleton
example is as follows...
What is happening is that it is possible to redefine the
datatype from panel to cross-section within the function and
operate on the (sampled) cross-section data. Further, the
setobs command at the end appears to allow you to go back to the
original panel structure. However, that does not get stick when
you goes back to the original calling routine and you are left
with cross-section data at the higher level .
Thanks for the report and example. That's definitely a bug. The
use of "setobs" within a function has not been properly analysed.
If it's allowed at all, it seems like it should revert
automatically when the function exits. I'll try to take a close
look at all this shortly.
Allin.