Confidence intervals for median

Introduction

Confidence intervals for median can be calculated for continuous variables (with a normal or skewed distribution). 

Function

Basic command
centile varlist 
Useful options
centile varlist, level(#) 
Explanations
varlistInsert the name(s) of the variable(s) that you want to use. 
level(#)Specify the confidence level. Default is 95. 
More information
help centile

Practical example

Dataset
StataData1.dta
Variable namecognitive
Variable labelCognitive test score (Age 15, Year 1985)
Value labelsN/A
centile cognitive

In this example, we can see that the median cognitive test score is 312, and the 95% confidence interval is 312-316.