Problems running INLA on a mac
Closed this issue · 1 comments
I am operating from a Mac OS (darwin 17.0) and I am running R version 4.2.2. For reasons I do not know, INLA seems not to be working properly on my computer so much that even simple functions are not giving results. For example, I used the code on INLA's website https://www.r-inla.org/download-install and to be specific I used the example below:
n = 100; a = 1; b = 1; tau = 100
z = rnorm(n)
eta = a + b*z
scale = exp(rnorm(n))
prec = scale*tau
y = rnorm(n, mean = eta, sd = 1/sqrt(prec))
data = list(y=y, z=z)
formula = y ~ 1+z
result = inla(formula, family = "gaussian", data = data)
summary(result)
Here is the error that I am encountering:
result = inla(formula, family = "gaussian", data = data)
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 132: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: No such file or directory
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 138: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: No such file or directory
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 138: exec: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: cannot execute: No such file or directory
Error in inla.inlaprogram.has.crashed() :
The inla-program exited with an error. Unless you interrupted it yourself, please rerun with verbose=TRUE and check the output carefully.
If this does not help, please contact the developers at help@r-inla.org.
*** inla.core.safe: inla.program has crashed: rerun to get better initial values. try=1/2
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 132: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: No such file or directory
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 138: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: No such file or directory
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 138: exec: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: cannot execute: No such file or directory
Error in inla.inlaprogram.has.crashed() :
The inla-program exited with an error. Unless you interupted it yourself, please rerun with verbose=TRUE and check the output carefully.
If this does not help, please contact the developers at help@r-inla.org.
*** inla.core.safe: inla.program has crashed: rerun to get better initial values. try=2/2
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 132: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: No such file or directory
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 138: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: No such file or directory
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla.run: line 138: exec: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/INLA/bin/mac/64bit/inla: cannot execute: No such file or directory
Error in inla.inlaprogram.has.crashed() :
The inla-program exited with an error. Unless you interupted it yourself, please rerun with verbose=TRUE and check the output carefully.
If this does not help, please contact the developers at help@r-inla.org.
Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts, :
*** Fail to get good enough initial values. Maybe it is due to something else.
I need guidance on how I can resolve the issue
Seems like that there were errors during the install, as supposed files are not there.
Can you try to install again, but with the testing version?
install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/testing"), dep=TRUE)
please respond to help@r-inla.org about how this went.
thx
H