admb

Homepage: http://admb-project.org/community/editing-tools/emacs/admb.el

Author: Arni Magnusson

Updated:

Summary

Major mode for creating statistical models with AD Model Builder

Commentary

Major mode for editing AD Model Builder (ADMB) code. Provides syntax highlighting, IDE compilation and file
manipulation, outline code navigation, templates, and smaller tools. The syntax groups for highlighting are:

Face                          Example
admb-section-face             DATA_SECTION
font-lock-builtin-face        objective_function_value
font-lock-comment-face        //
font-lock-constant-face       PI
font-lock-function-name-face  [FUNCTION] myfunction
font-lock-keyword-face        log
font-lock-type-face           int

Installation:

1. Copy this file (admb.el) to a directory in `load-path', or edit .emacs to add the directory to `load-path':
     (add-to-list 'load-path "mypath/admb")
2. Byte-compile this file to admb.elc for faster startup:
     M-x byte-compile-file
3. Edit .emacs so that `admb-mode' is autoloaded and assigned to *.tpl files:
     (autoload 'admb-mode "admb" "Edit ADMB code." t)
     (add-to-list 'auto-mode-alist '("\\.tpl$" . admb-mode))
4. If you're running Emacs in MS Windows, add a line so *.tpl files are not treated as binary:
     (setq file-name-buffer-file-type-alist nil)
5. You may want to assign a mode that recognizes #comments in *.dat files (perl-mode, conf-space-mode, or R-mode):
     (add-to-list 'auto-mode-alist '("\\.dat$" . conf-space-mode))

Customization:

See documentation of variable `admb-mode-hook' and function `admb-outline' for ideas.
See also ADMB-IDE (http://admb-project.org/community/editing-tools/admb-ide) for special use of `admb-mode'.

Usage:

See documentation of function `admb-mode'.

References:

Fournier, D. 2011. An introduction to AD Model Builder for use in nonlinear modeling and statistics. Version 10.0.
  Honolulu: ADMB Foundation. [http://admb-project.org/documentation/manuals/admb-user-manuals]
Fournier, D. 2011. AUTODIF: A C++ array language extension with automatic differentiation for use in nonlinear
  modeling and statistics. Version 10.0. Honolulu: ADMB Foundation.
  [http://admb-project.org/documentation/manuals/admb-user-manuals]
Fournier, D.A., H.J. Skaug, J. Ancheta, J. Ianelli, A. Magnusson, M.N. Maunder, A. Nielsen, and J. Sibert. 2012. AD
  Model Builder: Using automatic differentiation for statistical inference of highly parameterized complex nonlinear
  models. Optimization Methods and Software 27:233-249.
Magnusson, A. 2009. ADMB-IDE: Easy and efficient user interface. ADMB Foundation Newsletter 1(3):1-2.
  [http://admb-foundation.org/wp-content/uploads/Newsletter/ADMBNewsletterJuly2009.pdf]
Skaug, H. and D. Fournier. 2011. Random effects in AD Model Builder: ADMB-RE user guide. Version 10.0. Honolulu: ADMB
  Foundation. [http://admb-project.org/documentation/manuals/admb-user-manuals]

Known issues:

Indendation is not very smart
Cursor motion and deletions swallow entire underscore_separated_object_name, instead of pausing at each underscore
Does not work in XEmacs, reportedly

Dependencies