Filling vector with appropriate matrix elements

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

przem
Posts: 8
Joined: Fri Aug 01, 2014 12:52 am

Filling vector with appropriate matrix elements

Postby przem » Mon Aug 11, 2014 1:17 am

Hi,
I have one problem - I want to set vector which is composed of some elements of variance-covariance matrix of residuals. I place example below.
Przechwytywanie.JPG
Przechwytywanie.JPG (26.88 KiB) Viewed 3928 times
I have matrix like above and I need vector with 4 rows filled with elements from the matrix:
-c1,r2/c3,r2
1
-c3,r1/c2,r2
c4,r3/c4,r4

where c and r are columns and rows of matrix which I placed above.

Could anyone give me some advice or the syntax? I really need it.

Thank you in advance.

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

Re: Filling vector with appropriate matrix elements

Postby EViews Gareth » Mon Aug 11, 2014 7:58 am

I cannot follow your notation at all, but in general you can use (i,j) notation:

Code: Select all

myvector(2) = mymatrix(3,4)
sets the second element of the vector myvector equal to the 3rd row, 4th column element of the matrix mymatrix.

przem
Posts: 8
Joined: Fri Aug 01, 2014 12:52 am

Re: Filling vector with appropriate matrix elements

Postby przem » Tue Aug 12, 2014 1:12 am

It works!
Thank you :)


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests