Estimating the median age of first marriage although some people never marry Suppose that I want to estimate the median value of the age that people in some country marry for the first time. My samples could look something like this:
[21, 20, Never married, 38, 24, 30, Never married, 22, 20, 32, 26, 29]
As some people never marry, I don't think it's meaningful to find the mean value of the underlying distribution, so I am interested in the median instead. How do I estimate the median value of the distribution that those samples come from with a confidence interval using bootstrapping? Also, in the case that the majority of my samples contained people that never married, then the median would be "Never married", but what kind of a confidence interval would that give me?
 A: You are quite right to note that not everyone gets married. This points to the need for, and the power of the statistical concept of censoring, meaning that we have only partial information on a subject. More specifically, we are talking about left-censoring meaning that we observe them for a time, and then we do not know what happens afterward. In your case, during the entire time they were observed, some individuals did not get married. So what to do with this information? Well, during the time when they were observed any unmarried individual in your data was at risk of getting married, so they should contribute to the denominator in estimating risk of marrying at a given point in time, and to any cumulative measure of risk of marrying by a certain point in time.
These issues point squarely to event history analysis (which has a history of being termed "survival analysis" since it was developed originally for actuarial tables of life expectancy). Kaplan & Meier's estimator was, I believe, the first modeling approach to try and answer whether and when an event will occur along these lines. The Kaplan-Meier curve describes not experiencing even by a particular time, by graphing the estimated survival function $\hat{S}(t)$ vs. time. The survival function itself is the cumulative product of complements of the hazard function, $\hat{h}(t)$, which describes the probability of experiencing the event at time $t$. The median survival time—the last time at which half the subjects at risk experienced marriage and half did not—is represented on such curves.
More generalized discrete-time event history models have been developed (e.g., logit hazard, probit hazard, complementary log-log hazard, etc.), since the Kaplan-Meier estimator. There are, in addition, generalized continuous time event history models (e.g., Cox proportional hazards model, etc.). (Different categories of event history model will use different nomenclature... for example I believe the estimated hazard function I described above has quite a different meaning in, for example, competing risks models and Cox proportional hazards models.)
There are, naturally, a host of nuances one must think about when performing these kinds of analysis: the meaning of a unit of time, the beginning of time, time- and age-related selection biases, etc.
References
Kaplan, E. L. and Meier, P. (1958). Nonparametric estimation from incomplete observations. Journal of the American Statistical Association, 53(2):457–481.
Singer, J. D. and Willett, J. B. (2003). Applied Longitudinal Data Analysis: Modeling change and event occurrence. Oxford University Press, New York, NY.
