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
How to predict values one standard deviation above the means. …
Calculate Relative Risk with 95% CI from two-way tableHello, i have to variables (sex (male/female) & hypertens) and would like to calculate the 95% C…
AIC weights calculation and recursive regressionHello everyone, I am working on a Time series analysis, using VECM models. I will need to compare mo…
Do File Error - Incomplete Command ExecutionHi All I am using Stata 13 (on a MacBook MacOS Catalina), I have an error in executing commands fro…
Survey weights in pooled dataHi, I am using for my analysis pooled survey data from five different countries. I would normally u…
Subscribe to:
Post Comments (Atom)
0 Response to Division into two groups
Post a Comment