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
Implementing a mixture model of Gaussians in StataDear Statalisters, for my thesis I need to compare and evaluate statistical models provided by the …
Clusteff command for panel dataDear Statalisters, could anyone tell me whether the command "clusteff" can also be applied to panel …
Help with Time trends and collinearity in a panel data setDear Statalister, I have a panel data set (xtset msa year) for 291 MSAs over eight years. I have ru…
coefplot - creating a vertical coefficient plot with multiple lines across the entire x-axisDear Stata users, I'm having a problem creating a coefficient plot with Stata that produces vertica…
Survey data: Make a decision between Poisson regression and Negative binomial regressionDear Stata users, I hold a question here: I am using survey data and deciding which regression mode…
Subscribe to:
Post Comments (Atom)
0 Response to Division into two groups
Post a Comment