Hello,
I am working on a model for a “visual foraging task” in which a number of different people search for a number of items (a cog psych experiment). Details of previous work can be found in the paper cited below.
I have a model that at the end of the day is doing:
target += categorical_lpmf(Y[ii] | weights);
I’ll spare you all the details, but the simple version is:
I have n_targets items, and each item can be one of n_classes classes (typically, K=2-4). While there are a number of things that go into calculating the weight for each item, the question I have today is to do with specifying the underlying bias for selecting items of type n_classes =1 over n_classes = 2.
At present, I am modelling these “class weights” with:
simplex[n_classes] cW[K];
[Another complication is that i have K different conditions and I want to estimate the cW class weights for each condition].
I’m using the prior below:
// priors for fixed effects
for (ii in 1:K) {
target += dirichlet_lpdf(cW[ii] | rep_vector(alpha, n_classes));
}
The weights variable is calculated:
weights = cW[kk][targ_class[trl]];
[where trl is the current trial and kk is an integer specifying which condition the current trial is from, and targ_class[n_trials*L, n_targets] tracks which class each item in trial trl belongs to]
I hope that makes sense.
Anyway, my question is:
I’d like to add in some random effects for my cW. Is there a neat way of doing this with a simplex?
Another complication is that I have a number of other parameters, and ideally I’d like to model the correlations in the random effect structure.
Thanks
Alasdair
[for more info, see: Clarke, Hunt & Hughes (2022)]