Dear,
I have a simple model as below:
data{
int<lower=1> N ;
array[N] real ce ;
array[N] real high ;
array[N] real p ;
}
parameters{
real<lower=0> gamma;
real<lower=0> delta;
real<lower=0> sigma;
}
model{
\\auxiliary variables:
vector[N] wp;
vector[N] pv;
\\priors:
sigma ~ normal( 0.2 , 0.5 );
delta ~ normal( 1 , 0.5 );
gamma ~ normal( 1 , 0.5 );
\\model:
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.
Regards,
Elon