Thanks for the responses.

There is a lot more to the model I am working on (dimensions and complexity), so I tried to boil it down to the smallest example to explain the question I was asking. I have constraints and priors which seem to be working well.

Basically, I have two models that both work well independently, one for \lambda based on I, one for p based on V (where I use I in the binomial)

But I want to link them together.

**Two independent models**

```
data {
int n; //number of subjects
int v; //number of test types
int I[n] //number of times tested
int V[v,n]; //number of success
int E[n]; //Exposure to tests
}
parameters {
real lambda<lower=0>[n]; //Rate of tests
vector<lower=0>[v] alpha; //slope
vector[v] beta; // intercept
vector[n] theta; //subject latent score
}
model {
I ~ poisson(lambda .* E);
for (k in 1:v) {
V[k] ~ binomial_logit(I, alpha * theta + beta);
}
}
```

I linked them with this model:

```
model {
I ~ poisson(lambda .* E);
for (k in 1:v) {
V[k] ~ poisson(lambda .* E .* (alpha[k] * theta + beta[k]));
}
}
```

The failure occurred when changing the cohort of subjects (25% overlapped), \lambda inverted, i.e. a subject with the highest \lambda when one cohort had the lowest with another, and vice versa. My interpretation is that \lambda was being pulled to hard by V.

Maybe removing the dependence on I is the write move, but it seems like its ignoring part of the data.