Skip to content

tmbstan

MCMC Sampling from 'TMB' Model Object using 'Stan'

v1.1.0 · Mar 20, 2026 · GPL (>= 3)

Description

Enables all 'rstan' functionality for a 'TMB' model object, in particular MCMC sampling and chain visualization. Sampling can be performed with or without Laplace approximation for the random effects. This is demonstrated in Monnahan & Kristensen (2018) <DOI:10.1371/journal.pone.0197954>.

Downloads

842

Last 30 days

4244th

2.1K

Last 90 days

10.8K

Last year

Trend: +33.2% (30d vs prior 30d)

CRAN Check Status

3 NOTE
11 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (5 non-OK)
NOTE r-oldrel-macos-arm64

for GNU extensions in Makefiles

GNU make is a SystemRequirements.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 46.8Mb
  sub-directories of 1Mb or more:
    libs  46.5Mb
NOTE r-oldrel-macos-x86_64

for GNU extensions in Makefiles

GNU make is a SystemRequirements.
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 47.9Mb
  sub-directories of 1Mb or more:
    libs  47.6Mb
NOTE r-oldrel-windows-x86_64

for GNU extensions in Makefiles

GNU make is a SystemRequirements.

Check History

NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 24, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is 46.8Mb
  sub-directories of 1Mb or more:
    libs  46.5Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 47.9Mb
  sub-directories of 1Mb or more:
    libs  47.6Mb
NOTE r-oldrel-windows-x86_64

for GNU extensions in Makefiles

GNU make is a SystemRequirements.
WARNING 8 OK · 4 NOTE · 2 WARNING · 0 ERROR · 0 FAILURE Mar 20, 2026
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

Maintainer: ‘Kasper Kristensen <kaskr@dtu.dk>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Kasper",
                    family = "Kristensen",
                    role = c("aut", "cre"),
                    email = "kaskr@dtu.dk")
as necessary.
WARNING r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

Maintainer: ‘Kasper Kristensen <kaskr@dtu.dk>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Kasper",
                    family = "Kristensen",
                    role = c("aut", "cre"),
                    email = "kaskr@dtu.dk")
as necessary.
WARNING r-devel-linux-x86_64-fedora-gcc

compiled code

File ‘tmbstan/libs/tmbstan.so’:
  Found non-API call to R: ‘Rf_findVar’
This entry point may be removed soon.

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.
NOTE r-oldrel-macos-arm64

installed package size

installed size is 46.8Mb
  sub-directories of 1Mb or more:
    libs  46.5Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 47.9Mb
  sub-directories of 1Mb or more:
    libs  47.6Mb
NOTE r-oldrel-windows-x86_64

for GNU extensions in Makefiles

GNU make is a SystemRequirements.
ERROR 8 OK · 5 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

Maintainer: ‘Kasper Kristensen <kaskr@dtu.dk>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Kasper",
                    family = "Kristensen",
                    role = c("aut", "cre"),
                    email = "kaskr@dtu.dk")
as necessary.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

Maintainer: ‘Kasper Kristensen <kaskr@dtu.dk>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Kasper",
                    family = "Kristensen",
                    role = c("aut", "cre"),
                    email = "kaskr@dtu.dk")
as necessary.
ERROR r-release-macos-x86_64

examples

Running examples in ‘tmbstan-Ex.R’ failed
The error most likely occurred in:

> ### Name: tmbstan
> ### Title: Draw MCMC samples from a TMB model object using Stan
> ### Aliases: tmbstan
> 
> ### ** Examples
> 
> TMB::runExample("simple")
Running exa
...[truncated]...
ges/big-sur-x86_64/Rlib/4.5/TMB/examples/simple.so' (no such file), '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.5/TMB/examples/simple.so' (not a mach-o file)
Calls: <Anonymous> -> source -> withVisible -> eval -> eval -> dyn.load
Execution halted
NOTE r-oldrel-macos-arm64

installed package size

installed size is 46.8Mb
  sub-directories of 1Mb or more:
    libs  46.5Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 47.9Mb
  sub-directories of 1Mb or more:
    libs  47.6Mb
NOTE r-oldrel-windows-x86_64

for GNU extensions in Makefiles

GNU make is a SystemRequirements.

Reverse Dependencies (4)

imports

suggests

Dependency Network

Dependencies Reverse dependencies rstan Rcpp TMB BayesGP hmmTMB SAMtool salmonMSE tmbstan

Version History

updated 1.1.0 ← 1.0.91 diff Mar 20, 2026
new 1.0.91 Mar 10, 2026
updated 1.0.91 ← 1.0.9 diff Aug 25, 2023
updated 1.0.9 ← 1.0.7 diff Mar 28, 2023
updated 1.0.7 ← 1.0.4 diff Mar 23, 2023
updated 1.0.4 ← 1.0.3 diff Mar 20, 2022
updated 1.0.3 ← 1.0.2 diff Dec 13, 2021
updated 1.0.2 ← 1.0.1 diff May 17, 2019
updated 1.0.1 ← 1.0.0 diff Nov 8, 2018
new 1.0.0 Dec 18, 2017