Dear All,
I do have a matrix (KxN) and I need to extract certain elements of this matrix.
For each row of the matrix i need just one single element out of all columnes. The problem is that the columne I am looking for is not constant. E.g. For the first 100 rows i might need the values of my matrix in the 5th row, for the next 50 rows i might need the values of my matrix in the 13 th row etc, pp.
The information -which columne is relevant for row 1....K - is in a vector (Kx1)
Do you know how to solve this problem?
Single elements of a matrix: how to get
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: Single elements of a matrix: how to get
I don't understand what you are asking.
Re: Single elements of a matrix: how to get
Sorry for not beeing clear.
I have a matrix from wich i want to extract from each row one single element. The element i am looking for is not always in the same columne. The information from which column i want to draw the element is in a series (consisting numerical values).
I tried to use @columnextract! But this needs a constant arg2 so it does not help.
I can show my problem from a diifferent angle, too.
I have two groups: IR and DOD, both have the dimension 3654x100.
IR consists of rolling information ratios. DOD consists of the daily performance data. Both groups are such, that the columnes are related to the same trading model. I want to select the daily performance data at every time from the model with the max IR.
The IR group therefore indicates which performance data should be selected and can be thought of as a filter for the performance data. This is the problem to solve.
So far i did:
Series maxi= @rimax(IR)' shows for each day in which columne is the max IR-value.
Now i need to know how to extract for eachday the value in the DOD group in columne as indicated in maxi.
I would appreaciate your help very much.
I have a matrix from wich i want to extract from each row one single element. The element i am looking for is not always in the same columne. The information from which column i want to draw the element is in a series (consisting numerical values).
I tried to use @columnextract! But this needs a constant arg2 so it does not help.
I can show my problem from a diifferent angle, too.
I have two groups: IR and DOD, both have the dimension 3654x100.
IR consists of rolling information ratios. DOD consists of the daily performance data. Both groups are such, that the columnes are related to the same trading model. I want to select the daily performance data at every time from the model with the max IR.
The IR group therefore indicates which performance data should be selected and can be thought of as a filter for the performance data. This is the problem to solve.
So far i did:
Series maxi= @rimax(IR)' shows for each day in which columne is the max IR-value.
Now i need to know how to extract for eachday the value in the DOD group in columne as indicated in maxi.
I would appreaciate your help very much.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Single elements of a matrix: how to get
You're mixing up vectors/series and groups/matrices. Everything is in series/group form, or is it in vector/matrix form?
Re: Single elements of a matrix: how to get
What ever you want. Initially it is groups. Then i transformed into martrices because i was not able to solve my problem with groups and series
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Single elements of a matrix: how to get
Something like:
Code: Select all
series result = dod(@rimax(ir))
show result
Who is online
Users browsing this forum: No registered users and 1 guest
