Use buildmer to fit big generalized additive models using bam from package mgcv
buildmer
bam
mgcv
Useful links