Hi All
I have a string variable representing industry of the firm. There are 5 different industries. My dataset is quarterly cross section time series. I am interested in the aggregate profits of firms in each industry in a given quarter.
I measured aggregate profits in each industry in a given quarter with weights based on lagged market capitalization as following:
egen aggregate= wtmean(profit), by (fqdate industry) weight (lag_market)
duplicates drop fqdate, force
This now gives me a new variable “aggregate” that takes values representing the aggregate profit of each industry in a given quarter. I want now to create 5 time series where each time series represent each industry. In other words, I want to have 5 times series industry variables instead one industry variables.
Thanks for your help in advance
Lisa
I have a string variable representing industry of the firm. There are 5 different industries. My dataset is quarterly cross section time series. I am interested in the aggregate profits of firms in each industry in a given quarter.
I measured aggregate profits in each industry in a given quarter with weights based on lagged market capitalization as following:
egen aggregate= wtmean(profit), by (fqdate industry) weight (lag_market)
duplicates drop fqdate, force
This now gives me a new variable “aggregate” that takes values representing the aggregate profit of each industry in a given quarter. I want now to create 5 time series where each time series represent each industry. In other words, I want to have 5 times series industry variables instead one industry variables.
Thanks for your help in advance
Lisa
Comment