How can I use multi cores processing to run glm function faster
I used speedglm and the results are very good: using glm it took me 14.5 seconds to get results and with speedglm it took me 1.5 sec. that a 90% improvement..the code is very simple: m <- speedglm(y ~ s1 + s2,data=df)
. Just don't forget to install and call the package. Another issue: you can't use all variables with "." the speedglm does not recognize the dot as "all variables".
Other usefull packages are:
http://cran.r-project.org/web/packages/gputools/gputools.pdf
with gpuGlm
and
http://cran.r-project.org/web/packages/mgcv/mgcv.pdf
see mgcv.parallel section about
gam(..., control=list(nthreads=nc))
or
bam(..., cluster=makeCluster(nc))
where nc is the number of your real cores