store series into a matrix
Posted: Wed Sep 29, 2010 4:43 am
Hi,
I have 19 time series of evolving lenght for each of my variables. Therefore I created strings for each one.
Now, for the first round, I need to store only the last observation of each time series into a vector/matrix. The time series grow by one quarter each.
matrix(19,1) f_pez_1
.....
%first="1970:1" 'FIRST OBSERVATION OF THE ESTIMATION SAMPLE
smpl @all
!base=138 ' number of observations in first vintage
for !j = 1 to 19 ' start loop to estimate model
if !j<10 then %th="0" ' add 0 to string for j<10
else %th=""
endif
%x1="a_pez_" +%th +@str(!j)+"_0_1" ' create vintage specific labels
%x2="a_pus_" +%th+@str(!j)+"_0_1"
%y1="a_yez_" +%th+ @str(!j)+"_0_1"
%y2="a_yus_" +%th+ @str(!j)+"_0_1"
%h1="a_hez_" +%th+ @str(!j)+"_0_1"
%h2="a_hus_" +%th+ @str(!j)+"_0_1"
'%poil = "poil"
%e = "a_exch_"+%th+ @str(!j)+"_0_1"
smpl @first+!base+!j @first+!base+!j+1
f_pez_1(!j,1) = {%x1} <------ THE PROBLEM COMES UP HERE
next
I always get "NON NUMERIC ARGUMENT A_PEZ_01_0_1 in 'F_PEZ_1(1,1) = A_PEZ_01_0_1
A_PEZ_01_0_1 is a time series.
Eviews6
Hope to get an answer.
I have 19 time series of evolving lenght for each of my variables. Therefore I created strings for each one.
Now, for the first round, I need to store only the last observation of each time series into a vector/matrix. The time series grow by one quarter each.
matrix(19,1) f_pez_1
.....
%first="1970:1" 'FIRST OBSERVATION OF THE ESTIMATION SAMPLE
smpl @all
!base=138 ' number of observations in first vintage
for !j = 1 to 19 ' start loop to estimate model
if !j<10 then %th="0" ' add 0 to string for j<10
else %th=""
endif
%x1="a_pez_" +%th +@str(!j)+"_0_1" ' create vintage specific labels
%x2="a_pus_" +%th+@str(!j)+"_0_1"
%y1="a_yez_" +%th+ @str(!j)+"_0_1"
%y2="a_yus_" +%th+ @str(!j)+"_0_1"
%h1="a_hez_" +%th+ @str(!j)+"_0_1"
%h2="a_hus_" +%th+ @str(!j)+"_0_1"
'%poil = "poil"
%e = "a_exch_"+%th+ @str(!j)+"_0_1"
smpl @first+!base+!j @first+!base+!j+1
f_pez_1(!j,1) = {%x1} <------ THE PROBLEM COMES UP HERE
next
I always get "NON NUMERIC ARGUMENT A_PEZ_01_0_1 in 'F_PEZ_1(1,1) = A_PEZ_01_0_1
A_PEZ_01_0_1 is a time series.
Eviews6
Hope to get an answer.