Parametrised integrals

I tried this. I tried to change the value of x_i[1] inside the loop, i.e., x_i[1]=i and I got an error.

Is it allowed to change the value of transformed data inside the model block? If so, maybe I misinterpreted the error.