Make the @first function properly taking account of panel data
Posted: Fri Feb 14, 2025 3:10 am
Dear EViews team,
I am using EViews 14
I suggest that you improve the @first(x) function to work proper in panels so that it allows for showing the first value of series x in each cross section in the preselected sample. To give an example, I would like to have an easy function which would show the value 4040 for x in the lines 2 - 20- until 2 -24- rather than the value 2020 in the program below.
Ideally, you would allow for an additional argument to the function @first to indicate the cross-sectional variable. So in the example below @first(x,"2020 2024", crossid) would show 4040 from 2 -20- onwards, whereas @first(x) would work as it does currently. Likewise, in panels with more than one cross ids, you would also implement @first such as to allow for @first(x, "2020 2024", crossid1, crossid2).
Best, mamo
I am using EViews 14
I suggest that you improve the @first(x) function to work proper in panels so that it allows for showing the first value of series x in each cross section in the preselected sample. To give an example, I would like to have an easy function which would show the value 4040 for x in the lines 2 - 20- until 2 -24- rather than the value 2020 in the program below.
Ideally, you would allow for an additional argument to the function @first to indicate the cross-sectional variable. So in the example below @first(x,"2020 2024", crossid) would show 4040 from 2 -20- onwards, whereas @first(x) would work as it does currently. Likewise, in panels with more than one cross ids, you would also implement @first such as to allow for @first(x, "2020 2024", crossid1, crossid2).
Best, mamo
Code: Select all
wfcreate a 2000 2024 2
series x=crossid*@year
smpl 2020 2024
show x @first(x)