Description Usage Arguments Details Value Troubleshooting Author(s) Examples
Determines options for running AD Model Builder
1 2 |
impSamp |
Number of importance sampling steps |
maxfn |
Maximum number of evaluation steps |
imaxfn |
number of function evaluations used in intermediate optimization steps. |
maxph |
maximum phase |
noinit |
Don't initialize random effects before inner optimization: see ADMB-RE reference manual |
shess |
Use sparse Hessian: see ADMB-RE reference manual |
ZI_kluge |
retain a zero-inflation term of 0.001 even when |
poiss_prob_bound |
add a small term to prevent estimated Poisson probabilities of zero |
run |
Whether to run ADMB at all. This will write out files to the appropriate working directory, or read existing
output files in the working directory
( |
See the AD Model Builder reference manuals at http://admb-project.org/documentation/manuals/admb-user-manuals
Returns a list of options suitable for passing as the admb.opts
argument to glmmadmb
Some useful tricks for diagnosing and overcoming fitting problems:
Diagnostics
to find the version of glmmADMB
you are running, use
sessionInfo
to find the specific version of the ADMB binaries built into the package, use get_bin_version
to see exactly where glmmADMB
is looking for the
executable on your system, and to see what command-line arguments
it is passing to the ADMB executable, use debug=TRUE
to see lots more output from ADMB, use verbose=TRUE
Fixing problems
if the fit fails with "couldn't find STD file",
try setting noinit=FALSE
and/or shess=FALSE
if you want to try running the ADMB model outside of R, use
run=FALSE
and set save.dir
in the glmmADMB
arguments. This will result in a saved directory containing the
glmmadmb
executable (on systems other than Windows) as well as glmmadmb.pin
and
glmmadmb.dat
files. You can then run the glmmadmb
executable with appropriate command-line arguments in a command
shell or terminal window. If you run the same R command again
(i.e. still with run=FALSE
and with the same save.dir
)
glmmADMB
will find any output files that have been produced
and read them into a glmmadmb
object. You can also try sending
the glmmadmb.pin
and glmmadmb.dat
files to an ADMB
expert for diagnosis.
if the ADMB output shows a statement like "Use the [] command line option ...",
use the extra.args
argument to glmmadmb
to set command line
options for ADMB. ADMB's diagnostic statements are usually fairly specific about
which command line options to use, but see the ADMB reference manuals (linked from Details below)
for more information.
Ben Bolker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | admbControl(impSamp=200)
## Not run:
## running to produce saved files in directory:
data(bacteria,package="MASS")
bacteria$present <- as.numeric(bacteria$y)-1
## run to generate files
glmmadmb(present ~ trt + I(week > 2), random = ~ 1 | ID,
family = "binomial", data = bacteria,
save.dir="tmp",admb.opts=admbControl(run=FALSE),
debug=TRUE)
## now run glmmadmb outside of R ...
## ./glmmadmb -maxfn 500 -maxph 5 -noinit -shess
## run to read in data
result <- glmmadmb(present ~ trt + I(week > 2), random = ~ 1 | ID,
family = "binomial", data = bacteria,
save.dir="tmp",admb.opts=admbControl(run=FALSE))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.