The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » Calculating CI for median survival time (confidence intervals for weighted median survival time)
Calculating CI for median survival time Mon, 26 August 2019 04:45
 lka035 Messages: 9Registered: July 2016 Member
Dear DHS team,

I'm using DHS data and working on estimating the weighted median survival time. I have managed to get the weighted median survival time. However, I have been unable to get the standard error or confidence intervals for this estimate.

How can I calculate or obtain the confidence intervals for weighted median survival time using DHS data.

Do you have any resources on how to calculate this? Or any advice on how to do this?

[Updated on: Mon, 26 August 2019 04:45]

Report message to a moderator

Re: Calculating CI for median survival time [message #18222 is a reply to message #18043] Thu, 17 October 2019 10:26
 Liz-DHS Messages: 1516Registered: February 2013 Senior Member
A response from Dr. Ruilin Ren, Senior Sampler:
Quote:
Thanks for the post. If you use any of the major statistical software such as SAS, SPSS and STATA, you should be able to calculate the sampling error and the confidence interval of median using the complex survey module. In DHS, we use SAS. If you use SAS, you can use the codes:

```PROC SURVEYMEANS median DATA=your data;
VAR XXX (name of your edited survival time variable);
WEIGHT YYY (name of your weight variable);
STRATA ZZZ (the stratification variable);
CLUSTER V001;
RUN;
```

It is worth to note that SAS calculates a true interpolated median, while SPSS and STATA calculate the median value of the variable, not an interpolated median.
Hope this helps.
Ruilin Ren

Re: Calculating CI for median survival time [message #19053 is a reply to message #18043] Fri, 10 April 2020 00:17
 lka035 Messages: 9Registered: July 2016 Member
Thank you Liz and Dr Ruilin Ren for the response.

Dr Ruilin Ren, I have followed your SAS code but feel my answer is incorrect because I have not factored in the censoring indicator. I am still battling and struggling on how to include the person year variable and 0/1 censoring indicator in the equation or model.

In your SAS code response, you wrote "VAR XXX (name of your edited survival time variable);".
What does "edited survival time variable" mean? How can I generate the "edited survival time" variable?

A demonstration of an example of generating the edited survival time variable and obtaining the median survival time with CI for complex data using SAS will be greatly appreciated.
 Previous Topic: Survey Sampling weights Next Topic: cost of conducting a DHS survey
Goto Forum:

Current Time: Mon Nov 30 06:45:17 Coordinated Universal Time 2020