An introduction to EViews programming.
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
Re: An introduction to EViews programming.
I would like to store in a vector (or in a group, I don't know) the "s.e. of regression"s for all my 17 equations that I have in a file. What would be the command line for that? Thank you a lot.
_______________
врати блиндирани врати входни врати интериорни врати
_______________
врати блиндирани врати входни врати интериорни врати
Last edited by samonia on Sun Nov 30, 2014 5:58 am, edited 1 time in total.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12460
 Joined: Tue Sep 16, 2008 5:38 pm
Re: An introduction to EViews programming.
Code: Select all
%eqlist = @wlookup("*","equation")
!n = @wcount(%eqlist)
vector(!n) ses
for !i=1 to !n
%eq = @word(%eqlist, !i)
ses(!i) = {%eq}.@se
next
Follow us on Twitter @IHSEViews
Re: An introduction to EViews programming.
Hi guys, I am new to Eviews. I have a couple of question and appreciate any help.
I have the following code and trying to understand what it does: Specifically I need to first know what does w{%Y}(!i+1) mean?
I have the following code and trying to understand what it does: Specifically I need to first know what does w{%Y}(!i+1) mean?
Last edited by neshate on Tue Mar 31, 2015 3:25 pm, edited 1 time in total.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12460
 Joined: Tue Sep 16, 2008 5:38 pm
Re: An introduction to EViews programming.
You have two for loops. The first loops through %Y, the second loops through !i.
%Y is looping through object names. !i is looping through elements. Thus the first time through, we have w{%y}(!i+1), which means w914(1), which is the first element of the vector w914.
%Y is looping through object names. !i is looping through elements. Thus the first time through, we have w{%y}(!i+1), which means w914(1), which is the first element of the vector w914.
Follow us on Twitter @IHSEViews
Re: An introduction to EViews programming.
Thanks. So does that mean we never enter the if statement because we have not defined w914 yet?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12460
 Joined: Tue Sep 16, 2008 5:38 pm
Re: An introduction to EViews programming.
w914 must have existed prior to running the program. You'll enter the if statement if the first element of it is not equal to an NA.
Follow us on Twitter @IHSEViews
Re: An introduction to EViews programming.
Ohhh. Thank you very much. That helped a lot. So, I have two more question:
1. w{%Y}eqb{!i}.ls log(w{%Y}) C YEAR does this generate a least square regression of log(w914) with some constant ? What is YEAR? does this also exist before running?
2. What does this mean? w{%Y}eqa{!i}.c(2)
1. w{%Y}eqb{!i}.ls log(w{%Y}) C YEAR does this generate a least square regression of log(w914) with some constant ? What is YEAR? does this also exist before running?
2. What does this mean? w{%Y}eqa{!i}.c(2)

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12460
 Joined: Tue Sep 16, 2008 5:38 pm
Re: An introduction to EViews programming.
1) It estimates an equation of log(w194) on a constant and the variable year (which would have to previously exist, yes). It stores this equation in the object w914eqb1
2) It retrieves the second coefficient from the equation w914eqb1
2) It retrieves the second coefficient from the equation w914eqb1
Follow us on Twitter @IHSEViews
Re: An introduction to EViews programming.
Excuse me if I am asking stupid questions. what is the effect of smpl 1960+!i 1965+!i? does this mean that we have selected certain values of w914 for eqa and eqb?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12460
 Joined: Tue Sep 16, 2008 5:38 pm
Re: An introduction to EViews programming.
Yes. Only observations between 1960+1 and 1965+1 etc...
Follow us on Twitter @IHSEViews
Re: An introduction to EViews programming.
1. What is the format of w914eqa0 and w914eqb0 look like? I am trying to figure out what kind of table the .results line generates? for example when we try to access (4,1) element or (10,2)?
2. What does that 0.02 and 0.035 comes from? I feel that this program tries to do a ttest on a sample data, but I can not explain how. Any help on this is appreciated.
2. What does that 0.02 and 0.035 comes from? I feel that this program tries to do a ttest on a sample data, but I can not explain how. Any help on this is appreciated.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12460
 Joined: Tue Sep 16, 2008 5:38 pm
Re: An introduction to EViews programming.
I think you'll have to play around a bit and figure out the rest
Follow us on Twitter @IHSEViews
Re: An introduction to EViews programming.
Thanks for the help. Unfortunately, I do not have access to eviews and that is why I am not able to run this program ans see the results. But, thanks anyway. You helped a lot.
Re: An introduction to EViews programming.
Hi, I am new here so I hope you could help me.
We are doing an index for our work and it utilizes principal component analysis.
Basically, I have 10 variables which need to normalize. After normalizing the variables , I need to run a principal component analysis for these variables.
Once I have done that, I need to get the the 1st principal component for each variable and multiply that with the normalized values.
To get the index, I just need to add those values ( normalized values* 1st principal component)
So I would like to know if you could give the syntax.
What I want to do is to import the data from an excel file and run the commands I enumerated above.
TIA!
We are doing an index for our work and it utilizes principal component analysis.
Basically, I have 10 variables which need to normalize. After normalizing the variables , I need to run a principal component analysis for these variables.
Once I have done that, I need to get the the 1st principal component for each variable and multiply that with the normalized values.
To get the index, I just need to add those values ( normalized values* 1st principal component)
So I would like to know if you could give the syntax.
What I want to do is to import the data from an excel file and run the commands I enumerated above.
TIA!

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12460
 Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 7 guests