I’m trying to fit a simple three parameter nonlinear logistic function to a pooled dataset consisting of dose/response measurements. I’ve specified the logistic function as follows:

y=β1/((1+x/β2 )^(β3 ))

The data to be modeled is as follows:

Analysis Data.csv (426 Bytes)

The Stan code is as follows:

```
data {
int<lower=1> nY; // Number samples
vector[nY] x; // Dose
vector[nY] y; // Response
}
parameters {
real b1;
real b2;
real b3;
real<lower=0> tau;
}
transformed parameters {
real<lower=0> sigma;
sigma = 1 / sqrt(tau);
}
model {
// priors
b1 ~ uniform(1,2000000);
b2 ~ uniform(0.1,100);
b3 ~ normal(0, 1);
tau ~ gamma(0.1, 0.1);
// likelihood
y ~ normal(b1/(1+(x/b2)**b3), sigma);
}
```

The stan code generated the following error with b2 underlined in red:

` PARSER EXPECTED: expression`

As I’m new to stan, I’d greatly appreciate insight regarding my coding mistake. Thanks in advance for your help.