I am sorry I am being very descriptive here but I hope you could help me with the following problem (I try to program this in R):
Let's say we have array where rows are parties and columns are parties' issue positions (measured as distance from the median issue position across all parties). I want to model parties announcing an issue platform. This goes like this: start with the issue on which the distance from the median issue position is smallest and announce that platform with probability (1 minus issue distance from median....parties announce that issue that issue as their platform with probability = 1 if they are the median party on that issue). If rbinom(1,1, prob) ==1 they will announce that issue (i.e, the column indicator) as their platform. If rbinom(1,1, prob) == 0, they will move on to the issue on which the distance from the median issue position is second-to-smallest (and draw from a binomial distribution) And so forth until a platform is announced. All parties go through the same steps to find a issue platform for that run of the model, but parties differ on the issues on which they are closest to the median party.
Would you have advice on how to program such a set-up?