admin管理员组文章数量:1415673
I'm running a mixed model in mgcv::bam() and my most complex model is throwing the below error both on my PC (RStudio) & my work's high powered computing system running Linux. I think it's connected to the parallel computing options because it doesn't happen if I take out the nthreads = 12 - but then the model takes forever
Error in `pqr2()`:
! BLAS/LAPACK routine 'DGEMM ' gave error code -3
Backtrace:
1. mgcv::bam(...)
2. mgcv:::bam.fit(...)
3. mgcv:::qr_update(...)
4. mgcv:::pqr2(Xn, nt)
I can share my code but might struggle to give a MWE because it only happens in my biggest model.
# working model 8
F1.F.wigan.gamm8 <- bam(F2 ~
s(percent, k=4) + #difference in height of traj
s(percent, by=age_ord, k=4) +
s(percent, by=sex_ord, k=4) +
s(percent, by=fol_ord, k = 4) +
s(percent, by=style_med, k=4) +
ti(percent, dur) + #interaction between shape and duration
s(percent, ID, bs="fs", xt="cr",m=1,k=4) + #random smooth
# s(percent, traj, bs="fs", xt="cr",m=1,k=4) #random smooth
s(percent, word, bs="fs", xt="cr",m=1,k=4) #random smooth
, data=data_F_wigan,method="fREML", nthreads = 12)
# working model 9 no parallel
F1.F.wigan.gamm8 <- bam(F2 ~
s(percent, k=4) + #difference in height of traj
s(percent, by=age_ord, k=4) +
s(percent, by=sex_ord, k=4) +
s(percent, by=fol_ord, k = 4) +
s(percent, by=style_med, k=4) +
ti(percent, dur) + #interaction between shape and duration
s(percent, ID, bs="fs", xt="cr",m=1,k=4) + #random smooth
s(percent, traj, bs="fs", xt="cr",m=1,k=4) #random smooth
s(percent, word, bs="fs", xt="cr",m=1,k=4) #random smooth
, data=data_F_wigan,method="fREML")
# model causing error
F1.F.wigan.gamm8 <- bam(F2 ~
s(percent, k=4) + #difference in height of traj
s(percent, by=age_ord, k=4) +
s(percent, by=sex_ord, k=4) +
s(percent, by=fol_ord, k = 4) +
s(percent, by=style_med, k=4) +
ti(percent, dur) + #interaction between shape and duration
s(percent, ID, bs="fs", xt="cr",m=1,k=4) + #random smooth
s(percent, traj, bs="fs", xt="cr",m=1,k=4) #random smooth
s(percent, word, bs="fs", xt="cr",m=1,k=4) #random smooth
, data=data_F_wigan,method="fREML", nthreads = 12)
Edit: on the suggestion of @Roland I have added main effects to the model not working - it's still throwing the same error
F1.F.wigan.gamm9 <- bam(F2 ~
age_ord +
sex_ord +
fol_ord +
style_med +
s(percent, k=4) + #difference in height of traj
s(percent, by=age_ord, k=4) +
s(percent, by=sex_ord, k=4) +
s(percent, by=fol_ord, k = 4) +
s(percent, by=style_med, k=4) +
ti(percent, dur) + #interaction between shape and duration
s(percent, ID, bs="fs", xt="cr",m=1,k=4) + #random smooth
s(percent, traj, bs="fs", xt="cr",m=1,k=4) + #random smooth
s(percent, word, bs="fs", xt="cr",m=1,k=4) #random smooth
, data=data_F_wigan,method="fREML", nthreads = all_cores)
本文标签:
版权声明:本文标题:r - What's causing this error in mgcv::bam()? Error in `pqr2()`: ! BLASLAPACK routine 'DGEMM ' gave erro 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745214815a2648099.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论