In many chronic diseases, the patient's health status is followed up by quantitative markers. The evolution is often characterized by a 2-phase degradation process, that is, a normal phase followed by a pathological degradation phase preceding the disease diagnosis. We propose a joint multistate model with latent state for the joint modeling of repeated measures of a quantitative marker, time-to-illness and time-to-death. Using data from the PAQUID cohort on cognitive aging, we jointly studied cognitive decline, dementia risk, and death risk. We estimated the mean evolution of cognitive scores given age at dementia for subjects alive and demented, the mean evolution of cognitive scores for subjects alive and nondemented, in addition to age at acceleration of cognitive decline and duration of the pre-dementia phase.