Nested longitudinal data and estimating joint model

Sorry for not getting to you sooner. Your question is relevant an well written and I am glad you bumped it up.

Actually the two-step process of using the posterior of one model as a prior in another is (usually) the harder way in Stan (see e.g. Using posteriors as new priors - #3 by courtneygoodridge). However, the model as you have written it doesn’t use the ppd of x the predict y. It uses the observed x, which is fixed. I.e. you would get exactly the same results if you split the model into two, one for x and one for y.

The approach would be closer to what stan_jm does if you used \mu_{x,i} as the predictor instead of x_i. I. e.:

vector[N] mu_x = beta0_x + beta1_x * t; 
x ~ gumbel(mu_x, sigma_x);
y ~ normal(beta0_y + beta1_y .* mu_x, sigma_y);

This would be both more flexible (in that it involves uncertainty about beta0_x and beta1_x) and more rigid (in that it forces a strict linear influence of t on y). One could also add additional flexibility by treating mu_x as parameters and have something like mu_x ~ normal(beta0_x + beta1_x * t, sigma_mu_x) (although I would fear this model might have computational issues).

As for giving a name to the model - we need to be aware that all the nomenclature out there is not a prescription, it is just an attempt to force some order on the actual messy reality of models people fit. The model as you have originally written it would not IMHO deserve any special name: it is just two separate linear models. The model as I suggested above would probably best be called a “joint” model for x and y, but that really isn’t saying much as “joint” simply means we model multiple things together. So to remove any ambiguity I think you should report the model formulas as you did here to let everybody know what you mean by “joint model”.

Does that make sense?

2 Likes