On Tue, Jun 7, 2022 at 12:29 PM Ioannis Venetis
<ioannisvenetis(a)gmail.com> wrote:
I attach two gdt panel data files (is what I managed to do, TIME is a time index, GEO
lists 38 countries/regions, and two variables CP00, CP01),
example1.gdt goes from 2016:01-2018:12 and
example2.gdt goes from 2019:01-2022:04
(A) is there an "easy" way to "join" the two gdt files into one
time-larger file? running from 2016:01:-2022:04?
(B) how can i "easily" transform the panel dataset into a time-series set with
38 CP00 series, say EU_CP00, EA_CP00,... and 38 CP01 series, EU_CP01, EA_CP01,...?
On question (B) here's a slight refinement of Sven's suggestion:
<hansl>
open example1.gdt
set skip_missing off
matrix X = mshape({CP00}, $pd)
S = strvals(GEO)
loop i=1..nelem(S)
S[i] = "CP00_" ~ S[i]
endloop
cnameset(X, S)
T = rows(X)
nulldata T --preserve
setobs 12 2019:01
list CP00 = mat2list(X)
print CP00 -o
</hansl>
Allin