Hi there, my generated quantities block needs to be vectorized and I appreciate if anyone could help me with that. Here is the code that needs to be vectorized:

```
generated quantities {
vector[N_pred] y_pred;
for (n in 1:N_pred){
if (bernoulli_logit_rng(X[n] * beta1)) { //beta1 is defined as vector[I], X is a matrix of N_pred * D
y_pred[n] = normal_rng(X[n] * beta2, sigma); //beta2 is defined as vector[I], sigma is a real value
}
}
}
```

The following attempts give me error as below:

```
generated quantities {
vector[N_pred] y_pred= normal_rng(X * beta2, sigma);
vector[N_pred] labels = bernoulli_logit_rng(X * beta1);
y_pred = y_pred .* labels;
}
```

and the error is :

```
ValueError: SYNTAX ERROR, MESSAGE(S) FROM PARSER:
No matches for:
normal_rng(vector, real)
Available argument signatures for normal_rng:
normal_rng(real, real)
```

I tried changing sigma to rep_vector(1, N_pred) * sigma to have it as normal_rng(vector, vector) but still get an error. I believe I am doing similar thing to this, so I can not figure out what is wrong. I appreciate if anyone could take a look please.

PS: I am using CmdStan.