LKJCholeskyCov shape argument

Thanks for you help, Jonsedar. I understand the .dist and Potential(log(p)) idioms now.

Yes, your depiction of the dataset is accurate. Part of my goal with this model is to examine individual variation in the covariance matrix. Thus, I want to estimate the covariance matrix (chol) for each individual participant. Will I need to loop over participants for this using something like:

for i in range(n_subs):
chol, corr_, stds_ = pm.LKJCholeskyCov(‘lkjcc_{}’.format(i), n=2, eta=2., sd_dist=sd_dist, compute_corr=True)

Although not a particularly elegant solution, it would probably work?

The other main question I have pertains to the calculation of ‘uij’. Assuming ‘invL’ is 2 by 2 and ‘targets’ is 2 dims by 60 trials dims per participant, how exactly should I write the line of code for this variable such that it computes ‘uij’ for each trial given ‘i’? I’m not so confident in my understanding of how PyMC3 handles indexes (i.e., targets[subs_idx]; where [subs_idx] is a flattened array for unique participant_ids with length num_participants * num_trials).