Hello everybody!
First of all, I apologize if I am asking something obvious, I have very little experience working with Stan and in general with Bayesian statistics.
I want to create a model of peer assessment. Given a set of grades by a peer X to a group of students, and given a set of grades by a different peer Y to that same group of students, I am computing in the transformed data
block the mean and variance of the resulting differences. In other words: if X has assessed v,w and z with grades G^{x}_{v}, G^{x}_{w}, G^{x}_{z}; and Y has assessed these same students with grades G^{y}_{v}, G^{y}_{w}, G^{y}_{z}, I am computing the mean \mu_{xy} = \frac{\sum_{i}G^{x}_{i} - G^{y}_{i}}{|\{G^{x}\}\cap\{G^{y}\}|}, where the denominator denotes the number of peers assessed both by X and Y. Similarly, the variance is computed as \sigma_{xy} = \frac{\sum_{i}(G^{x}_{i} - G^{y}_{i} - \mu_{xy})^{2}}{|\{G^{x}\}\cap\{G^{y}\}|}.
I intend now to use \sigma_{xy} and \mu_{xy} as the parameters of a normal distribution such that b \sim \mathcal{N}(\mu_{xy}, \sigma_{xy}), where b is a new variable.
Seeing this as a PGM, we would have the set of grades G^{x}_{v}, G^{x}_{w}, G^{x}_{z}, G^{y}_{v}, G^{y}_{w}, G^{y}_{z} as observed nodes, all of them parents of data-derived \mu_{xy} and \sigma_{xy}, which are likewise parents of an unobserved child b. As you may notice, given the deterministic definitions of \mu_{xy} and \sigma_{xy}, their existence depends on |\{G^{x}\}\cap\{G^{y}\}| \neq 0. Does Stan support such a model? Could I define b as a parameter?