[ADMB Users] glmmADMB errors in R on Mac

Skip to first unread message

McCracken, Shawn F

Nov 3, 2010, 4:36:25 PM11/3/10
to us...@admb-project.org

I have tried to install glmmADMB two ways on my Mac OS 10.6.4 and I keep getting an error when I go to run the examples.

> fit = glmm.admb(y~Base*trt+Age+Visit,random=~Visit,group="subject",data=epil2,family="nbinom")
Error in glmm.admb(y ~ Base * trt + Age + Visit, random = ~Visit, group = "subject",  :
  The function maximizer failed

I first installed via the directions on the left of this page: http://otter-rsch.com/admbre/examples/glmmadmb/glmmADMB.html

The only thing I had to do differently was finding the location of the nbmm and bvprobit files. I found them here on my machine: /Library/Frameworks/R.framework/Versions/2.11/Resources/library/admb and replaced them with those from macversions.zip

I also tried the install from: install.packages("glmmADMB", repos="http://r-forge.r-project.org")

I have tried looking online for a solution with no luck. Could you please direct me on how to fix the problem?

Thank you,

Shawn McCracken

dave fournier

Nov 4, 2010, 3:29:59 AM11/4/10
to us...@admb-project.org
I emailed you some working binaries since they seem to be too large to
post here. They are 32 bit versions from os x 10.6.4
Users mailing list

Ben Bolker

Nov 3, 2010, 10:45:46 PM11/3/10
to us...@admb-project.org

This happens on my system too.
I have poked around a little bit more to make sure that the binary
actually got copied correctly, has the right permissions, etc. ...
However, running from the command line gives

bolker$ ./nbmm
Illegal instruction



## simplified method for copying mac versions -- identify
## mac versions with file.choose(), copy to system location

## from debugger:

#Browse[2]> system("file nbmm")
#nbmm: Mach-O executable i386
#Browse[2]> system("ls -l nbmm")
#-rwxr-xr-x 1 bolker staff 4141016 3 Nov 21:54 nbmm
#Browse[2]> system(cmd2)
#Browse[2]> system("./nbmm")
#debug: unlink(file_name)
#debug: if (!file.exists(std_file)) stop("The function maximizer failed")
#debug: stop("The function maximizer failed")
#Browse[2]> std_file
#[1] "nbmm.std"
#Browse[2]> list.files()
#[1] "nbmm.dat" "nbmm.pin"

## file.show() on nbmm.dat and nbmm.pin suggests they
## look about as expected ...

R version 2.11.1 (2010-05-31)

[1] en_CA.UTF-8/en_CA.UTF-8/C/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] glmmADMB_0.4-1

loaded via a namespace (and not attached):
[1] tools_2.11.1

dave fournier

Nov 3, 2010, 3:40:03 PM11/3/10
to us...@admb-project.org

I recompiled nbmm and bvprobit on OS X 10.6.4
32 bit. They are attached (maybe). The epil example runs
for me with nbmm.


Shawn McCracken

Nov 7, 2010, 9:57:25 AM11/7/10
to Us...@admb-project.org
Problem solved - Thanks Dave

The solution that worked for me:

I used the binaries Dave sent in admbfiles.zip in the post above.
First, I copied them to my desktop and unzipped.
Opened Terminal and typed the following to direct it to run nbmm in the expanded folder and confirm it would run:

ShawnMBP:$ /Users/Shawn/Desktop/admbfiles/nbmm     #of course you will need to change this to navigate to where it is on your computer#
Error trying to open data input file /users/shawn/desktop/admbfiles/nbmm.dat
 Error trying to read in model data
 This is usual caused by a missing DAT file

Dave said the error message comes from ndmm looking for the data file to use but it is running.

I then located where glmmADMB had originally placed these same named files when I did the install of glmmADMB. I can’t remember how I found where they were and spotlight won’t show them either. I think I did a search just for “R” and found a R.framework folder in the Library folder. I looked through there and found them in a folder called admb here:


I then replaced the nbmm and bvprobit files that were there with the ones provided by Dave.
Started up R, loaded glmmADMB, viewed the epil2 dataset, and then ran the example model and it ran fine!

My system: Macbook Pro, Mac OSX 10.6.4, R 64-bit

Hope this helps.

Reply all
Reply to author
0 new messages