Hi all,
I have panel data on firms in 3 countries (e.g., 100 firms in 3 countries in 5 years, and event happen at the 3rd year in all countries at the same time). For an example, for each firms I have 4 variables, including:
y x1 x2 profitability
(while y is dependent variable and the rest are independent variables). I am examining the impact of a law on y by using differences-in-differences. There is a theory that suggests that the law has more impact on firms' with high profitability. Therefore, I want to test the impact of laws on a sample of firms with high profitability. One possible solution is to separate the sample by the mean of profitability before event date.
In general, each firms has 5 profitability (given my sample period is 5 (from 2016 to 2021)). However, there are some firms only have 4 or 3 observations due to missing values.
I am wondering how to code to get the subsample that firms where the profitability in year 2017 higher than median or at the quantile top 10%.
Thank you.
I have panel data on firms in 3 countries (e.g., 100 firms in 3 countries in 5 years, and event happen at the 3rd year in all countries at the same time). For an example, for each firms I have 4 variables, including:
y x1 x2 profitability
(while y is dependent variable and the rest are independent variables). I am examining the impact of a law on y by using differences-in-differences. There is a theory that suggests that the law has more impact on firms' with high profitability. Therefore, I want to test the impact of laws on a sample of firms with high profitability. One possible solution is to separate the sample by the mean of profitability before event date.
In general, each firms has 5 profitability (given my sample period is 5 (from 2016 to 2021)). However, there are some firms only have 4 or 3 observations due to missing values.
I am wondering how to code to get the subsample that firms where the profitability in year 2017 higher than median or at the quantile top 10%.
Thank you.
Comment