Dear statalists,
I am running an analysis with an unbalanced dataset for 10 years. I would like to see whether the results differ for two groups of firms based on net income across years. For this reason, I want to differentiate and run the analysis for dependent variables of two groups of firms: one high-income firms and low-income firms (based on the L.median of net income). However, I am stucked now, as the command "bysort time: egen MNincome = median (l.netincome)" gives me error "not sorted", although I have sorted the data beforehand.
Could you please kindly advise, how to overcome this error? Maybe there is a different, simpler approach to run that kind of analysis? (without creating dependent variables for each group e.g. "gen employeesgroup1 = numberofemployees if MNincome > 10" where 10 is a median obtained from the command "sum netincome, detail" as 50% percentile.
Thank you in advance!
Related Posts with Division into two groups
Data cleaning question for string variablesI had what I hope will be a simple data cleaning question. I'm importing some data and some individu…
Interpretation of result for cross sectional independence test - xtcd2Hi - I have received this result and with the negative CD value I am confused over its interpretatio…
Help with a gravity model!Good morning, At the moment I am doing a gravity model for the trade in music. My problem is very s…
Question: Creating an indicator for every fifth eventI have a question concerning an efficient way to create an indicator for the date at which an event …
Create numlist based on values? I am currently struggling a bit with Stata syntax. As I am using the "margins" command, I want to s…
Subscribe to:
Post Comments (Atom)
0 Response to Division into two groups
Post a Comment