using svy command and computing median

#1

Hi Joe,

I am looking to compute median income for different racial groups from the ACS, while using svy. Stata doesn’t seem to allow me to do:

svy: bysort race: sum inctot, de

or

bysort race: sum inctot [pweight=perwt], de

How do you recommend I get medians while using the svy command? Thanks!

Ps- my apologies for contacting you directly, but I am getting pretty anxious.

#2

findit epctile

* should lead to my webpage

epctile inctot, svy percentile(50) over(race)

HTH, Stas

#3

Thanks for the epctile tip. I used it, and I got:

Mata run-time error

r(3499);

Is there a bug?

#4

There is no Mata code in epctile.ado, so this must be some sort of version incompatibility. Can you post the full output?

#5

Sure,

epctile inctot, svy percentile(50) over(asian1g)

(running mean on estimation sample)

Mata run-time error

r(3499);

Thanks again

#6

OK, didn’t help :-\

set trace on

set tracedepth 2

which epctile

epctile again

Send to the address in the header of the epctile.ado file which would show up when you “which” it.

Stas

#7

When I “Which” it, I get:

c:\ado\plus\e\epctile.ado
*! percentile as estimation procedure

Where shall I send it exactly?

#8

Also, it seems to think that “again” is a variable, it says,

variable again not found.

#9

Hm. This is probably a REALLY old version of the file, then.

skolenik at gmail dut com

#10

I have been able to update the .ado file on my website, so try

net from http://members.socket.net/~skolenik/s…

net d epctile

net install epctile, replace

It should show something like

. which epctile
c:\ado\plus\e\epctile.ado
*! percentile as estimation procedure v.1.4 by Stas Kolenikov, skolenik at gmail dot com

If it still does not work, I’ll ask for more detailed debug info.