# no parallel
mod1withLogLik <- calcLogLik(mod1, draws=5000)
#with parallel using detected number of cores
library(parallel)
cl <- makeCluster(detectCores())
mod1withLogLik <- calcLogLik(mod1, draws=5000, cl=cl)
Run the code above in your browser using DataLab