Bayesian inference for an illness-death model for stroke with cognition as a latent time-dependent risk factor