I have a hierarchical modelling puzzle that I would like your collective wisdom on.

For clarity, my model is an ODE model of PK/PD dynamics tracking the both the pathogen dynamics (both in the absence and presence of treatment) and drug dynamics. For this example, let N be a set of subjects: N_{untreated} and N_{treated} are sets of untreated and treated subjects, respectively. Similarly, \theta is a set of parameters, \theta_{baseline} is a set of baseline parameters that is shared among untreated and treated subjects, and \theta_{treated} contains PK/PD parameters that are only informed by N_{treated}. I’m then interested in estimating the mean (the entire parameter set, \theta) and subject-level effects (including correlations among subject-level effects).

Based on the above premises, I present my proposed model structure below. But I am afraid there is some issues with subject-level effects in this formulation.

```
u = diag_pre_multiply(sd_u, L_u) * z_u;
for(j in 1:size_N) {
theta[j][1] = theta_baseline_1 + u[1,j];
theta[j][2] = theta_baseline_2 + u[2,j];
theta[j][3] = theta_treated_1 + u[3,j];
theta[j][4] = theta_treated_2 + u[4,j];
}
```

where `L_u ~ lkj_corr_cholesky(5)`

, `sd_u ~ normal(0,1)`

and `to_vector(z_u) ~ normal(0,1)`

. Specifically the issue is that the model would estimate ` u[3,j]`

and `u[4,j] `

for N_{untreated}, which seems nonsensical. But in order to keep the dimension of ` u`

as \theta \times \theta, I felt forced into this formulation.

Do you think I can just ignore ` u[3,j]`

and `u[4,j] `

from the output for N_{untreated}? Or, is this formulation going to cause a problem for estimation of subject-level parameter correlations, `L_u`

.

I am wondering an alternative might be a two-step fitting: first to fit the baseline model describing only the pathogen dynamics to N_{untreated} and plug in the posteriors as priors in the second stage fitting of N_{treated}. However, my concern is that there may be interactions (or subject-level correlations) between M_{baseline} and M_{treated} so that all effects should be estimated simultaneously. Also it would be a problem for interpretation if M_{baseline} estimated from N_{treated} differs from that estimated from N_{untreated} due to potential interactions.

Thank you for your help in advance.