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
Individual line colours in pcspikeHello, I'm trying to create a parallel axis dot plot where each line has a different colour (I've m…
Line Graph in Panel DatasetHi! I wanted to how to create a single line graph for a panel dataset? The dataset looks something l…
Is this the correct Stata syntax for CF/2SRI with an ordinal probit in the first stage?Dear All, I am mostly an R user. But since I have not found a way yet to reproduce generalised resi…
Creating a treatment for DID analysis: how to do it the right?Hi all. I have panel data containing the number of Brazilian institutions of higher education (varia…
Weights in the rdbwselect commandI am trying to use the rdbwselect command and it has the the following syntax (from The Stata Journa…
Subscribe to:
Post Comments (Atom)
0 Response to Calculate median with conditions
Post a Comment