REAL alpha ~ user_gamma(0.25, 0.5) REAL tau ~ continuous_uniform(0.5, 10) INTEGER gamma ~ discrete_uniform(-1, 1) ENTITY species, "species.data" { REAL a ~ user_normal(alpha, tau) INTEGER waterbird(1) } ENTITY cell, "gridcell.data", "neighbours.data" { REAL q = SUM(&x) REAL waterpercentage(4) INTEGER researchgrade(7) INTEGER centeredcoordinate(3) } ENTITY observations, "obs.data", combines (cell, species) { REAL p = EXP(waterbird*a*waterpercentage + gamma*centeredcoordinate + 0.25 * q)/(1 + EXP(waterbird*a*waterpercentage + gamma*centeredcoordinate + 0.25 * q)) # 0.25 could be any other constant. defines spatial weighting. INTEGER x ~ user_bernoulli(p) INTEGER observation(*) ~ user_defined_points2(x, researchgrade) }