@jsocolar Thanks a lot. I guess I’d better explain the original problem because otherwise, the current one might sound irrational.
Here is the original problem: I ask some users to express their opinions on some items. For the sake of simplicity, let’s assume that they express their opinions by integers, where sometimes a higher number means a higher preference, and sometimes the other way around (both ways can be asked from one user for a set of items). The goal is to obtain a weight for the items and for each user as well as an aggregated weight representing the preferences of all the users combined. The weights need generally to be non-negative and have a unit-sum constraint.
For doing this in Bayesian statistics, I used the multinomial distribution for the users’ inputs and the Dirichlet distribution for the weights. Assume that users will give us two vectors of integers, the magnitude of elements in one is proportionate to the weight and is proportionate to the inverse weight for the other one. So, the STAN model would be is as follows:
data {
int<lower=2> cNo; //#items
int<lower=1> usrNo; //#uesrs
int AB[usrNo, cNo]; //values proportionate to the inverse weight
int AW[usrNo, cNo]; // values proportionate to the weight
vector<lower=0,upper=1>[cNo] e; // a vector of one
}
parameters {
simplex[cNo] W[usrNo]; //the weight vectors of all users (one for each)
simplex[cNo] wStar;// aggregated weight
real<lower=0> kappaStar; // a parameter used for aggregation modeling
}
model {
kappaStar ~ gamma(.01,.01);
wStar ~ dirichlet(0.01*e);
for (i in 1:usrNo){
W[i] ~ dirichlet(kappaStar*wStar);
AW[i,:] ~ multinomial(W[i]);
vector[cNo] wInv;
wInv = e ./ W[i];
wInv ./= sum(wInv);
AB[i,:] ~ multinomial(wInv);
}
}
Now, the problem that I have is that sometimes users would not give concrete (integer) numbers, but rather intervals, discrete probabilities (e.g., 4 with a likelihood of 70% and 5 with 30%), or even other sorts of uncertainties, such as the triangular distribution (note that not only integers are acceptable as the inputs so that the multinomial dist in the above model should be changed to encompass other types of inputs).
Now, I would like to take these sorts of inputs into account, but don’t know how. It seems simple at the beginning since it is only required to sample from the given intervals (or other specified inputs) first and then execute the rest of model sampling. However, it is more difficult to implement.
Thanks again @jsocolar, @hhau and I hope the above explanation is clear now.