[ADMB Users] glmmADMB errors in R on Mac

89 views
Skip to first unread message

McCracken, Shawn F

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

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

unread,
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
Us...@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users

Ben Bolker

unread,
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

??


==================
library(glmmADMB)

## simplified method for copying mac versions -- identify
## mac versions with file.choose(), copy to system location
file.copy(file.choose(),system.file("admb",package="glmmADMB"),
overwrite=TRUE)

## 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")
#Browse[2]>
#debug: unlink(file_name)
#Browse[2]>
#debug: if (!file.exists(std_file)) stop("The function maximizer failed")
#Browse[2]>
#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 ...

sessionInfo()
R version 2.11.1 (2010-05-31)
i386-apple-darwin9.8.0

locale:
[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

unread,
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.

admbfiles.zip

Shawn McCracken

unread,
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:

MBP_SFM>Library>Frameworks>R.framework>Versions>2.11>Resources>library>glmmADMB>admb

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.

Shawn
Reply all
Reply to author
Forward
0 new messages