Copy data from a panel structure page to a time series page
Posted: Thu Aug 24, 2023 1:13 am
Hi, everyone,
I have a panel data set with 5000 firms and 40 quarters. There's a series named "ebit".
I want to apply exponential smooth to this series "ebit" for 5000 firms.
How can I do it on the page with a panel structure? If you know, please help me.
Anyway, it seems that I can't use the exp smooth method on this structure page.
So, I have an idea:
First, create a new page "smooth" with a pure time series structure of 40 quarters.
Second, I change the sample in the panel page to select the first firm and copy the "ebit" into the "smooth" page.
Third, smoothes the first firm's "ebit" on the "smooth" page.
So I think if I can run a loop, then I can smooth all 5000 firms' "ebit".
However, it seems there's something go wrong when I copy the first firm's ebit from the panel page to the "smooth" page:
(1) After the copy, the ebit data in the smooth page is different from the data in the panel page;
(2) In the loop, I tried the first 5 firms, and I found that, in the smooth page, all the ebit data of these 5 firms I copied from the panel page are the same.
So, how can I make my idea work???
I have a panel data set with 5000 firms and 40 quarters. There's a series named "ebit".
I want to apply exponential smooth to this series "ebit" for 5000 firms.
How can I do it on the page with a panel structure? If you know, please help me.
Anyway, it seems that I can't use the exp smooth method on this structure page.
So, I have an idea:
First, create a new page "smooth" with a pure time series structure of 40 quarters.
Second, I change the sample in the panel page to select the first firm and copy the "ebit" into the "smooth" page.
Third, smoothes the first firm's "ebit" on the "smooth" page.
So I think if I can run a loop, then I can smooth all 5000 firms' "ebit".
However, it seems there's something go wrong when I copy the first firm's ebit from the panel page to the "smooth" page:
(1) After the copy, the ebit data in the smooth page is different from the data in the panel page;
(2) In the loop, I tried the first 5 firms, and I found that, in the smooth page, all the ebit data of these 5 firms I copied from the panel page are the same.
So, how can I make my idea work???