Am 25.08.2020 um 16:37 schrieb Allin Cottrell:
On Mon, 24 Aug 2020, Sven Schreiber wrote:
>
> When looking at the code, I see the function 'ntodate' (in
> lib/src/dataio.c) which nowadays is a little misleading I'd say, because
> it is also used to construct the label for a panel observation (which
> includes the unit, not just a date). So my proposal would be to adjust
> that name eventually - of course this means a lot of changes to all the
> calls, but with grep and search and replace this shouldn't be a big
> problem. Or is there anything I'm missing?
I don't think you're missing anything. Renaming that function might be
helpful -- maybe as ntolabel or similar?
ntolabel sounds good. (Or ntoobslabel?)
"panel_pd" is not much developed as yet. It's set to 0
(and therefore
never used for anything) by default, and set to non-zero only via
"setobs". Right now it's only used for plotting panel data with a
single time range -- so either a single group, or a plot with "groups
overlaid" (panplot --overlay) or a group means time series (panplot
--means). There's no user accessor for panel_pd.
One simple change that might allow greater functionality would be to
offer an accessor (say, $pantime). This could be a bundle holding the
panel_pd and the label for the first observation.
Something like that would be good I guess. However, in principle I would
also expect something like what $obsminor or $obsmicro do in the
time-series case. BTW, I see that adding periodic dummies (seasonals)
also works fine for panel data where panel time is set. Isn't panel_pd
also used there? Going from seasonal dummies to a season index doesn't
seem like a huge step.
While we're at it: When the panel time is set the menu item "add
seasonal diff of variable" is active, but trying to use it just brings
up an error window.
thanks
sven