Hi Everyone,

is there a way to apply exponentiation to vectors without using for loop?

for example,

I have,

model{

vector[100] p;

vector[100] q;

…

q = p^3.02;

…

}

How can I do this without for loop like this,

for (n in 1:100) {

q[n] = p[n] ^ 3.02;

}

Looking forward for an efficient solution to avoid using for loop.

Thanks,