Page 1 of 1

Store Covariance Matrix with actual variable name

Posted: Tue Nov 18, 2014 12:44 pm
by mbeckr18
Hi,

I am currently trying to write a programm that directly saves the covariance matrices for a number of equations. However, I do not manage to display a covariance matrix that displays the actual variable names (instead the variables are numbered such as r1,r2 etc). Is there any way that I can automatically store the covariance matrix with the actual variable names (the same way it is displayed when you manually go to view and then select the covariance matrics?)

the code I currently use:
for !i=1 to N
matrix x_{!i} = ecm_{!i}.@coefcov
freeze(tabx{!i}) x_{!i}
next
for !i= 1 to N
tabx_{!i}.save(t=csv) H:\CSV\Cov_{!i}.csv
next

I would very much appreciate your help. I am sure it is possible but I really can not figure it out and it would help me a whole lot.

thank you very much in advance.

Re: Store Covariance Matrix with actual variable name

Posted: Tue Nov 18, 2014 1:47 pm
by EViews Gareth

Code: Select all

for !i=1 to N freeze(tabx{!i}) ecm_{!i}.coefcov tabx_{!i}.save(t=csv) H:\CSV\Cov_{!i}.csv next

Re: Store Covariance Matrix with actual variable name

Posted: Tue Nov 18, 2014 2:14 pm
by mbeckr18
Great, thank you so much :)