Page 1 of 1

How to create a vector containing series name?

Posted: Wed Dec 15, 2010 6:01 am
by Gibus
Hello,

I am Eviews7 user.
I would like to create a matrix(7,3) from the extraction of 3 vector columns from different other matrixs.
One of this 3 vector columns should contain the serie (or variable) names of a group.
As serie names are string, how can I create a vector contaning these string names?
(Later, this should allow me to identify the corresponding (vlookup) variable name for an identified value).

...
group groupC {%jres} groupA
for !k =1 to groupC.@count
!lmk=groupC.@count
%kname = groupC.@seriesname(!k)
vector (!lmk) varnames
varnames(!k) = %kname
etc..
matrix(!lkm,3) matcorprob
colplace(matcorprob, vcorabs,1)
colplace(matcorprob,vcorprob,2)
colplace(matcorprob,varnames,3)

Re: How to create a vector containing series name?

Posted: Wed Dec 15, 2010 7:41 am
by EViews Gareth
Vectors and matrices can only contain numerical data, not strings. You can use an svector to contain strings rather than numbers. However you cannot place an svector inside a matrix using the colplace command (since matrices cannot contain strings).

Re: How to create a vector containing series name?

Posted: Wed Dec 15, 2010 9:32 am
by Gibus
Thanks for your answer.
Therefore, the only way is to use numerical serie names instead of string serie name i.e. X1 to Xn into 1 to n, or is there an another way?

How to create a vector containing series name?

Posted: Wed Dec 15, 2010 10:19 am
by EViews Gareth
I'm not certain I follow what you're doing. You might prefer to use a table object.