Am 28.09.2022 um 14:00 schrieb atecon:
Am 28.09.2022 13:38 schrieb Alison Loddick:
> Hi,
>
> I think this is a simple question but I am new to Gretl and keep
> trying things without success
>
> I have data with variables and years as columns, and my rows are
> companies, so my data variables look like
>
> Company name,ROE_year 1, ROE_year 2, ROE_year 3, ROE_year 4, Var2_year
> 1, Var2_year 2, Var2_year 3, Var2_year 4, Var3_year 1, Var3_year 2,
> Var3_year 3, Var3_year 4, Etc.
>
Hi Alison,
please have a look at the stack() function ("help stack") and also at
"stack_data" package via:
...
You need to stack your series which refer to some specific year.
Section 4.5 of the gretl manual also deals with the 'stack' function.
But in this case I don't think it's straightforward, Artur, it's not a
case that is directly covered. At least that's how it seems to me.
My suggested way until someone comes up with a better idea would be to
split the file by column blocks such that each resulting new file would
only contain a single variable (ROE, Var2, Var3, etc.). Once the
individual variables have been read into gretl, merging them should not
be a problem.
cheers
sven