Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to find weighted median_st-svy


From   "Reda, Ayalu (Alumni)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: How to find weighted median_st-svy
Date   Tue, 5 Feb 2013 03:44:23 +0100

Greetings!

I was analyzing the three DHS survey (2000, 2005, and 2011) data on Ethiopia.

The problem I am experiencing is that Stata wouldn't provide me the weighted medians in stsum. I have also tried the stdescribe command but to no avail. I know that there is a problem in these estimates since the values I am getting from the survival curves and the stsum command are different. Given the data, I also expect that the weighted survival times will be numbers with decimals as opposed to the whole numbers that stdescribe and stsum keep providing me.

I think that the the values in the Kaplan-Meier graph are somehow correctly weighted, where as those of the stdescribe and stsum are not.

Is there anyway other way that I could estimate the weighted medians? If this is not possible is there a wisdom in taking the median values of the K-M curve? If yes, how do I precisely do that? 

Many thanks in advance,

P.S:

Here are the commands I applied:
 
/*...graph and calculate time to first marriage among women who had premarital sex.*/

svyset psuXyear [pweight=weight], strata(waveXstrata)
stset premsexmar2 [pweight=weight], failure(evermarrie)
stsum, by(source)
sort source
by source: stdescribe
sts graph, by(source) xlabel (1(1)6) tmin(0) tmax(7) xline( 3 6, lpattern(shortdash)) xtitle("risk period") title("Kaplan-Meier survival curves of time to first marriage among women who had premarital sex")

********************************************
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index