Getting PSIS-LOO from joint models

We were discussing “joint models” here, i.e. estimating a parameter from two different sets of data, accounting for commonalities in the data generating processes.

In a simple example, we could estimate beta from datasets y and y’ using something like:

target += normal_lpdf(y | alpha + beta * x, sigma);
target += normal_lpdf(y_prime | alpha_prime + beta * x_prime, sigma_prime);

It should work, but I wonder how to get the log_lik for further use in loo in this case? Simply using a vector of length sum of the lengths of y and y_prime?

Yes, if you think leaving out just one observation from either y or y_prime is sensible. If y and y_prime are same length and y[i] and y_prime[i] are a pair, and you would prefer to leave out that pair, then you would sum the corresponding log_lik values.

1 Like