We present a frailty model to estimate the relative importance of genetic and environmental factors on age at onset of dementia in a twin design. We use modern survival methodology to define a model that accounts simultaneously for longitudinal aspects, e.g., left truncation and right censoring in data, and the multivariate nature of twin data. Additionally, we present a novel three-state frailty model, with nondemented, demented, and dead states, describing variation in the onset of disease and mortality simultaneously in one model, while accounting for possible dependence for the two competing events. The frailty structure, i.e., the latent random effects structure, mimics the traditional twin model for continuous variables used in quantitative genetics, and as such describes within-pair dependence. This in turn leads to estimates for intrapair correlations, as well as for additive genetic, and shared and nonshared environmental components of variance. A hierarchical Bayesian model formulation and Gibbs sampling are used to estimate posterior distributions of the parameters. The models are applied to Swedish Twin Registry data on the onset of dementia in elderly twins. Based on the three-state frailty model, we estimate the intrapair correlations for dementia to be 0.87 [90% credible interval: 0.61,0.98] and 0.68[0.18,0.91] for MZ and DZ twins, respectively. Based on our model, we estimate that genetic effects account for about one third, and shared environmental effects for almost a half, of the variation in dementia hazards between individuals. More data, however, are needed to gain precision in these estimates.