model {

alpha ~ normal(0,10);

sigma ~ cauchy(0,10);

b_0 ~ cauchy(0,10);

b_titer ~ cauchy(0,10);

for (n in 1:N){

vector[N] theta;

theta[n] = inv_logit(b_0 + b_titer*low[n]);

for (i in 1:100){

vector[100] theta_sep;

theta_sep[i] = inv_logit(b_0 + b_titer*(low[n]+i*(diff[n]/100)));

}

theta[n] = theta[n] + sum(theta_sep);

target += bernoulli_lpmf(infection[n] | theta[n]);

}

always error, than there is no thets_sep…