Hello, I'm sort of new into EViews programming and I have the following question.
I'm using a program to create a table with lots of information and calculations for a paper. Everything works just fine except for one thing.
I want to include for every set of calculations the name of the state I'm doing it for. I have an alpha series with the respective names of the states. I know this can be done with an expression like this:
tabla1(1,1) = @elem(nombre_entidad, "1")
In this case, the program returns me the first element of the series and posts it in the (1,1) cell. Till now, everything's okay.
The real problem begins when I want to build a "for function" to have it automatically made for all the states in my data. My expression then goes like this:
[...]
for !n =1 to 32
smpl if entidad = !n
tabla1(!i,1) = @elem(nombre_entidad, "!n")
[...]
This is where the problem begins as the program shows the following:
"Illegal date !N in "TABLA1(7,1) = @ELEM(NOMBRE_ENTIDAD, "!N")" on line 5".
I want to run the for function as I don't want to go state by state writing the name, but the program shows me this.
Any ideas how to solve it?
Using @elem for an alphaseries inside a for
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Using @elem for an alphaseries inside a for
Code: Select all
%n = @str(!n)
tabla1(!i,1) = @elem(nombre_entidad, %n)
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: EViews Gareth and 33 guests