Hello all Stan coders,

I am trying to obtain a prior predictive check graph, but I do not know how to specify the random normal draws from a vector of betas. I tried specifying vector [P] beta = normal_rng(0, 2), but did not work.

Here is my code.

data {

int<lower=0> N; // Number of data items

int<lower=0> P; // number of predictors in regression

matrix[N,P] X; // matrix for regression

vector[N] Y;

}

generated quantities {

vector [N] y_predict;

**vector[P] beta = normal_rng(0, 2); ???**

real alpha = normal_rng(0, 2);

real<lower = 0> sigma = inv_gamma_rng(2,2);

for (i in 1:N) {

y_predict[i] ~ normal_rng(alpha + X[i]*beta, sigma);

}

}

Thanks, champs.

Antony