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.
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.
Filling vector with appropriate matrix elements
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
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
I cannot follow your notation at all, but in general you can use (i,j) notation:
sets the second element of the vector myvector equal to the 3rd row, 4th column element of the matrix mymatrix.
Code: Select all
myvector(2) = mymatrix(3,4)
Re: Filling vector with appropriate matrix elements
It works!
Thank you :)
Thank you :)
Who is online
Users browsing this forum: No registered users and 2 guests
