From what I understand from the stan handbook (13.1 Binomial distribution | Stan Functions Reference), the new | notation is for binomial_lcdf, however, when I specify the following model:

```
model {
// Prior
theta ~ beta(1,1);
thetaprior ~ beta(1,1);
// Observed Data
z_observed ~ binomial(n, theta);
// Unobserved Data
target += nfails * log(binomial_cdf(25 , n, theta) - binomial_cdf(14 , n, theta));
}
```

I get the warning:

Use of binomial_cdf without a vertical bar (|) between the first two arguments is deprecated.

The model compiles and samples nicely, but still…

What am I doing wrong?

nhuurre
#2
The | notation has been around for a while for lpdfs but 2.27 extended it to cdfs too.

I guess the documentation has not been updated.

2 Likes

you are absolutely right. I made the following change

```
target += nfails * log(binomial_cdf(25 | n, theta) - binomial_cdf(14 | n, theta));
```

and while the RStudio syntax check gives me an error

PARSER EXPECTED: “(”

The model compiles and samples fine.