I want to calculate the median of a variable with certain restrictions. I know that -sum variable, detail- gives me the 50th percentile, ie the median. Also I can command -sum variable if condition- but that doesn't give me the median. Also I'm not allowed to command -sum variable, detail if condition- or variations of that. Concretely I want something like -sum income, detail if income>1000-
Probably a simple answer, but any help would be appreciated.
Related Posts with Calculate median with conditions
ssc cortestiI was wondering if any others agree that the Williams test implemented in the SSC program cortesti m…
how to use color to differentiate the two groups? Code: set scheme s2mono * Example generated by -dataex-. To install: ssc install dataex clear inp…
xtlogit does not converge (not concave)Dear Statalist I'm having difficulties trying estimate the following model working with panel data …
Help with changing reference category when doing a cox regressionHello, I am doing a cox regression and have a variable socioeconomic status 'ses' which I have label…
Estimation problemsHello dear Stata netizens. I am a PhD student in economics. The tests carried out revealed the prese…
Subscribe to:
Post Comments (Atom)
0 Response to Calculate median with conditions
Post a Comment