Quick (easy) question
Posted: Tue Apr 30, 2013 9:32 am
Hi there, pleaes help me with this quick question.
I have a panel data, where I'd like to assign a value to a series as follows:
where "matrix" is the name of a matrix object and "age" is a series that contains the age of every person in the panel.
The problem is that, instead of using the actual age of every cross-section in a given time, EViews always assumes that age is equal to the age of the very first cell in my sample.
For example, if the age of crossid = 1 and dateid = 1 was 25, then "test" would be set equal to matrix(25,3) for all cross-sections and all time period.
How can I make EViews understand that I want age to equal the age of each observation in the panel? If only @elem existed for panels, I would have written:
but @elem doesn't seem to work in a panel.
Thanks very much!
I have a panel data, where I'd like to assign a value to a series as follows:
Code: Select all
series test = matrix(age,3)The problem is that, instead of using the actual age of every cross-section in a given time, EViews always assumes that age is equal to the age of the very first cell in my sample.
For example, if the age of crossid = 1 and dateid = 1 was 25, then "test" would be set equal to matrix(25,3) for all cross-sections and all time period.
How can I make EViews understand that I want age to equal the age of each observation in the panel? If only @elem existed for panels, I would have written:
Code: Select all
test = matrix(@elem(age,@year,@crossid),3)Thanks very much!