Hi,
I'm new to GRETL so please excuse the following naive question. How do
I create a new variable in a script? Here's my problem. I have a
monthly times series from 1960:1 to 2009:4. One variable is the monthly
cpi. I merely want to calculate the percent change on an annual basis.
I used the following:
genr pct = (((cpi/lags(1, cpi))^12)-1)*100
and got
gretl version 1.8.0
Current session: 2009/06/10 19:29
? genr pct = (((cpi/lags(1, cpi))^12)-1)*100
Data types not conformable for operation
Error executing script: halting
genr pct = (((cpi/lags(1, cpi))^12)-1)*100
What's wrong? What's conformability have to do with this? Conformable
on what? Also, I did the following:
genr lag = lags(1, cpi)
and got
gretl version 1.8.0
Current session: 2009/06/10 19:32
? genr lag = lags(1, cpi)
Generated list lag
but lag was no where in my variable list, although cpi(-1) was. Can
someone explain how variables are created?
Any help is appreciated.
Thanks,
Walt
--
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
dataanalytics(a)earthlink.net
www.dataanalyticscorp.com