Correlation table - save results

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

Pawel_S
Posts: 22
Joined: Sun Jan 05, 2014 5:18 am

Correlation table - save results

Postby Pawel_S » Tue Jan 21, 2014 8:29 am

Hi,

I'm EViews 8 user. I've got this code which computes correlation table of five variables:

group gr1 var1 var2 var3 var4 var5
gr1.cor corr prob
freeze(corr_tab) gr1.cor corr prob

Is there a way to combine line 2 and 3 together without using command "freeze"? The thing is if you use "freeze" at the beginning of a line, it is sometimes difficult to understand what this line is doing, especially if you're not familiar with programming. So, I was thinking about a set of commands that would first create an empty table called "corr_tab" and then update the table to make it a correlation matrix. In summary, I think my question is about how to refer to existing tables.

Any suggestions welcome.

Best,
Pawel

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Correlation table - save results

Postby EViews Gareth » Tue Jan 21, 2014 9:00 am

I'm not sure what you're asking. However, I'll point out that line 2 is completely unnecessary.

Pawel_S
Posts: 22
Joined: Sun Jan 05, 2014 5:18 am

Re: Correlation table - save results

Postby Pawel_S » Wed Jan 22, 2014 7:24 am

Hi,

thanks for your reply. I do indeed realize that the second line is unnecessary. The reason why I do it is to show the students that I first create a table and then freeze it. If I put freeze at the beginning of the line, they may get a bit confused, especially if they have no experience with programming at all.

Another way of doing it would be to create an empty table first called corr_tab and then to update it by assigning a correlation matrix to it. I do it for graph. E.g.

graph price_dist price ' creates object of type graph called price_dist
price_dist.distplot hist theory(dist=normal) ' updates the graph price_dist to show a histogram and fitted normal density function

Is there a similar set of commands for tables?

Best,
Pawel

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Correlation table - save results

Postby EViews Gareth » Wed Jan 22, 2014 7:34 am

No.

Pawel_S
Posts: 22
Joined: Sun Jan 05, 2014 5:18 am

Re: Correlation table - save results

Postby Pawel_S » Wed Jan 22, 2014 8:07 am

Thanks for your reply.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests