Am 30.05.2013 10:50, schrieb Riccardo (Jack) Lucchetti:
I have now written at least a dozen of sets of scripts which use the
bundle to store pretty much everything and implement
estimators/tests/etc. In my experience, the best way to proceed (at
least in a project which involves more than a hundred lines of hansl
code) is to have 3 separate functions: one for populating the bundle
with the reuslts (estimates etc -- call it A), one for printing out the
results (call it B) and a third one, which acts as a wrapper, like
function bundle C(..., int verbosity)
bundle mod
...
A(&mod, <whatever>)
if verbosity>1
B(&mod)
endif
return mod
end function
So you have the choice of using the GUI to call function C, or you can
simply call A() if you don't care about viewing the results (like in a
Monte Carlo experiment, or because it's just an intermediate good to
what you want).
This is basically the way the gig and SVAR add-ons work, and quite happy
about it.
Yes it is quite natural so I arrived at basically the same structure, too.
This machinery is quite cool indeed, I will upload the package with the
small-sample cointegration rank test soon, it seems to be working well
so far.
Just three things before I forget them:
1) Nothing in the bundle window gives the user a hint that she is
actually dealing with such a bundle. What I mean is: append the menu
entries "save to session as icon" or "save to icon and close" with the
bundle keyword. ("save entire bundle to session as icon" for example)
2) String members of the bundle are nowhere to be found in the GUI.
3) Still pending is the possibility to shove this into the cointegration
test submenu.
thanks,
sven