Page 7 of 8

### Re: An introduction to EViews programming.

Posted: Thu Nov 20, 2014 4:37 am
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.
_______________
врати блиндирани врати входни врати интериорни врати

### Re: An introduction to EViews programming.

Posted: Thu Nov 20, 2014 8:41 am

Code: Select all

`%eqlist = @wlookup("*","equation")!n = @wcount(%eqlist)vector(!n) sesfor !i=1 to !n   %eq = @word(%eqlist, !i)   ses(!i) = {%eq}.@senext`

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 7:31 am
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?

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 7:53 am
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.

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 7:57 am
Thanks. So does that mean we never enter the if statement because we have not defined w914 yet?

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 8:02 am
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.

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 8:07 am
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)

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 8:20 am
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

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 8:33 am
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?

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 8:47 am
Yes. Only observations between 1960+1 and 1965+1 etc...

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 9:34 am
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 t-test on a sample data, but I can not explain how. Any help on this is appreciated.

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 9:53 am
I think you'll have to play around a bit and figure out the rest

### Re: An introduction to EViews programming.

Posted: Tue Mar 31, 2015 12:02 pm
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.

Posted: Fri Jul 03, 2015 2:31 am
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!

### Re: An introduction to EViews programming.

Posted: Fri Jul 03, 2015 8:30 am
What have you go so far?