I want to lead several variables, as well as keeping all their attributes. I also want to keep their original names. The purpose is to align day-ahead prices with the date they are active.
The following code does not work, it creates only NA-values:
Code: Select all
for %sname {%eviewsname}
genr {%sname} = {%sname}(-1)
next
Tried using the @lag-operator, giving this error message:
Illegal @MOV???, @LAG, @CAGR, or @PCAGR specification in
"GENR {%SNAME} = @LAG(NOK_ELSP_PRI_ARE_H_NO1_1, -1)"
in PRISSTATISTIKK.PRG on line 18.
I have tried a few other variations, and would like some advice on how to achieve what I want, as I don't seem to be able to.