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
Combine the values of several obserationsDear Stata users, Can someone help me to combine data of same month but different dates into one. …
system limit exceeded - see manual r(1000); While using odkmeta to merge ODK data setDear statalist, I was using the packege odkmeta for merging ODK datasets. I am using ODK briefcase …
Extracting a subset of a varlist using wildcards such as *I am writing a command which takes a varlist as anargument. The variables correspond to different dr…
Combine the values of several obserationsDear Stata users, Can someone help me to combine data of same month but different dates into one. …
Ologit: conditional marginal effect and semi-elastictyDear All, After estimating an ordered logit model, I want to to calculate and draw the plot of cond…
Subscribe to:
Post Comments (Atom)
0 Response to Calculate median with conditions
Post a Comment