Parser expected when defining data


I have a simple model as below:

    int<lower=1> N ;
    array[N] real ce ;
    array[N] real high ;
    array[N] real p ;
    real<lower=0> gamma;
    real<lower=0> delta;
    real<lower=0> sigma;
\\auxiliary variables:
    vector[N] wp;
    vector[N] pv;
    sigma ~ normal( 0.2 , 0.5 );
    delta ~ normal( 1 , 0.5 );
    gamma ~ normal( 1 , 0.5 );
    for ( i in 1:N ) {
        wp[i] = (delta*p[i]^gamma)/(delta*p[i]^gamma + (1-p[i])^gamma);
        pv[i] = wp[i] * high[i];
        ce[i] ~ normal( pv[i] , sigma * high[i] );

It is strange that I have get the error message:

parsing error:

 1:  data{
 2:      int<lower=1> N;
 3:      real ce[N];
 4:      real high[N];
 5:      real p[N];

“;” expected after variable declaration.

I believe this should be that I miss something simple, but I just could not find it. Your help will be very appreciated.


[edit: I forgot to mention—we deprecated the old array syntax in favor of the new one.]

should be

array[N] real ce;

though I would probably make these all vectors in case I wanted to do vector operations on them, i.e.,

vector[N] ce;

Hi, Bob

Thanks for your help.

In my model, you can see that I indeed coded as
array[N] real ce; but somehow stan inherently transforms it to real ce[N]
as implied by the error message.

Also, I used your suggested syntax vector[N] ce;, but I got a same error message.