copying (extracting) data from alphaseries
Posted: Wed Sep 29, 2010 1:58 am
I have 2 alphaseries, A01 and A02 with roughly 2000 observations.
in A01 I have three strings, A, B and C.
I want to copy (or extract) the observation A02 (i) into a new series A03 provided A01 (i) = “A”; so far, this is not so difficult to manage; see my program – as a result, I get A03 with the observations from A02 as well as blank cells (where A01 doesn´t meet “A”)
alpha A03
smpl @all if A01 = “A”
A03 = A02
I just want to fill A03 from A03 (i) = 1, 2 etc. and leave out the blank cells.
how can I do this? I tried it also with a for loop and the if –function using @obs or @rows in A03 (i) like A03 (!obs) = A02 (!i) with !obs = @obs(A02)+1; I need to define A03 (i) which is obviously different from A02 (i).
I use eviews 7.1
in A01 I have three strings, A, B and C.
I want to copy (or extract) the observation A02 (i) into a new series A03 provided A01 (i) = “A”; so far, this is not so difficult to manage; see my program – as a result, I get A03 with the observations from A02 as well as blank cells (where A01 doesn´t meet “A”)
alpha A03
smpl @all if A01 = “A”
A03 = A02
I just want to fill A03 from A03 (i) = 1, 2 etc. and leave out the blank cells.
how can I do this? I tried it also with a for loop and the if –function using @obs or @rows in A03 (i) like A03 (!obs) = A02 (!i) with !obs = @obs(A02)+1; I need to define A03 (i) which is obviously different from A02 (i).
I use eviews 7.1