The RTMB package provides a native R interface for a substantial subset of TMB so you can avoid coding in C++.
RTMB only affects the TMB function MakeADFun that builds the objective function. Once MakeADFun has been invoked, everything else is exactly the same and models run as fast as if coded in C++.
PROS:
- Fast to change and re-run models because no compilation is needed.
- Debugging can be performed using the normal R debugger rather than gdb.
- Most common TMB features are supported. See current list of working examples.
- Simplified interface can automatically simulate from the model and calculate OSA residuals.
More information, including vignettes (introduction / advanced) and documentation, can be found on the RTMB universe page.
install.packages('RTMB')install.packages('RTMB', repos = c('https://kaskr.r-universe.dev', 'https://cloud.r-project.org'))NOTE: Requires at least TMB-1.9.7.
remotes::install_github("https://github.com/kaskr/RTMB", subdir="RTMB")tinytest::test_package("RTMB")runs the tests.
- If you get a segfault while installing the package, please re-install
Rcppfrom source and try again (see #5).
install.packages('RTMBp', repos = c('https://kaskr.r-universe.dev', 'https://cloud.r-project.org'))install.packages('RTMBode', repos = c('https://kaskr.r-universe.dev', 'https://cloud.r-project.org'))