Am 11.01.21 um 19:15 schrieb Sven Schreiber:
Hi everybody,
I know this has been discussed before, but I'm confused about the status
quo. I have a panel dataset with time dimension (years) from 1993
through 2018. Then I have a time series file (gretl format) ranging from
1991-2019, so slightly longer on both ends.
I have tried in vain using the "join" dialog to add that time series
into the panel, matching by the explicit "year" denomination, or
"$obsmajor" or whatever. (This is the release candidate.)
Now I actually know how to solve this, as described in the cheatsheet
section of the guide: Shorten the time series manually to match the
panel T length. But I'd like to know if there's anything I'm missing to
do it more elegantly (in the future).
Hi,
from a SQL perspective this behaviour of join -- which is in fact a left
join to a LHS panel data set identified by the time dimension (years)
and unit dimension from a RHS time series identified by the time
dimension -- looks somehow surprising to me. If the key on which to join
is the time dimension (assuming the date/ time format of both LHS and
RHS keys match), then I would immediately think that it should not
matter what length the RHS has in case of a left-join.
Here a visualisation where both x and y have valid values
LHS panel : RHS time-series
T unit x T y
-------------- -------
2 A 1
3 A 2
4 A 3
2 B 4
3 B 5
4 B
left-join:
T unit x y
------------------
2 A
3 A
4 A
2 B
3 B
4 B
Artur