R qbeta with vectors slow speed

234 Views Asked by At

I have 3 vectors called vp, va and vb:

vp contains 1.5 million random probabilities

va contains 1.5 million alpha values

vb contains 1.5 million beta values

I am trying to create an output that is a vector that looks like:

vanswer <- c(qbeta(vp,va,vb)) 

I know that this works, however the speed is tremndously slow with such large amounts of data and I am trying to find a way to speed it up. I have also tried doing the computation in a matrix with cbind() as well as using sapply(), but I cannot find the right way.

Any help would be helpful!

0

There are 0 best solutions below