Simona -
I don't think preallocating your random variables would make
the code run any faster.
A very simple change that would speed things up a little would
be to replace
simPD.vec[i]=length(R.vec[R.vec
Dear all,
Does anyone have any idea on how to speed up the for() loop below.
Current
Dear all,
Does anyone have any idea on how to speed up the for() loop below.
Currently it takes approximately 2 minutes and 30 seconds.
Because of the size of Nsim and N, simulating a multivariate normal
(instead of simulating Nsim times a vector of N normal distributions)
would require too much
2 matches
Mail list logo