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
Keeping duplicate observations with the true value in other variablesHi Stata users, I have a problem looping over string values. I have a data set that contains duplic…
Duplication of ID variables in panel dataHi All. I have the following duplication of data in id & p_id, which I need to resolve. This da…
how to create this table?Array I succeed to run these 6 regressions. The first 3 regressions are OLS and the last 3 columns…
Interaction term insignificance & Marginsplot problemHi all, My initial pooled OLS estimation yields results with statistically significant coefficients…
Likelihood ratio omnibus test of significance & multiple comparisonsHi there, I have a data set which includes: 5 polygenic scores for different mental illnesses and a…
Subscribe to:
Post Comments (Atom)
0 Response to Division into two groups
Post a Comment