Package: RTMBp 1.6

RTMBp: 'R' Bindings for 'TMB'

Native 'R' interface to 'TMB' (Template Model Builder) so models can be written entirely in 'R' rather than 'C++'. Automatic differentiation, to any order, is available for a rich subset of 'R' features, including linear algebra for dense and sparse matrices, complex arithmetic, Fast Fourier Transform, probability distributions and special functions. 'RTMBp' provides easy access to model fitting and validation following the principles of Kristensen, K., Nielsen, A., Berg, C. W., Skaug, H., & Bell, B. M. (2016) <doi:10.18637/jss.v070.i05> and Thygesen, U.H., Albertsen, C.M., Berg, C.W. et al. (2017) <doi:10.1007/s10651-017-0372-4>.

Authors:Kasper Kristensen [aut, cre]

RTMBp_1.6.tar.gz
RTMBp_1.6.zip(r-4.5)RTMBp_1.6.zip(r-4.4)RTMBp_1.6.zip(r-4.3)
RTMBp_1.6.tgz(r-4.4-x86_64)RTMBp_1.6.tgz(r-4.4-arm64)RTMBp_1.6.tgz(r-4.3-x86_64)RTMBp_1.6.tgz(r-4.3-arm64)
RTMBp_1.6.tar.gz(r-4.5-noble)RTMBp_1.6.tar.gz(r-4.4-noble)
RTMBp_1.6.tgz(r-4.4-emscripten)RTMBp_1.6.tgz(r-4.3-emscripten)
RTMBp.pdf |RTMBp.html
RTMBp/json (API)

# Install 'RTMBp' in R:
install.packages('RTMBp', repos = c('https://kaskr.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/kaskr/rtmbp/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

6.10 score 48 stars 1 scripts 115 exports 6 dependencies

Last updated 2 months agofrom:db0a40188a (on RTMBp). Checks:OK: 1 ERROR: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 11 2024
R-4.5-win-x86_64ERRORNov 11 2024
R-4.5-linux-x86_64ERRORNov 11 2024
R-4.4-win-x86_64ERRORNov 11 2024
R-4.4-mac-x86_64ERRORNov 11 2024
R-4.4-mac-aarch64ERRORNov 11 2024
R-4.3-win-x86_64ERRORNov 11 2024
R-4.3-mac-x86_64ERRORNov 11 2024
R-4.3-mac-aarch64ERRORNov 11 2024

Exports:[.advector[.osa[.simref[[.advector[<-.advector[<-.simref%~%$.TapeADadcomplexADjointADoverloadADREPORTadvectoraperm.advectorapplyas.array.simrefas.vector.advectorbesselIbesselJbesselKbesselYc.advectorcbind.advectorcheckConsistencycolSumsComplex.advectorcov2corDataEvaldautoregdbetadbinomdbinom_robustdcompoisdcompois2dexpdfdgammadgmrfdiagdiff.advectordiff.simrefdim.simrefdim<-.simrefdlgammadlnormdlogisdmultinomdmvnormdnbinomdnbinom_robustdnbinom2dnormdpoisdseparabledSHASHodsndtdtweediedweibulleigenexpAvfftgetAllGetTapeifelseinterpol1Dfuninterpol2Dfunis.array.simrefis.matrix.simrefis.na.simrefis.numeric.advectorlength.simrefMakeADFunMakeTapeMath.advectorMath.simrefmatrixOBSoneStepPredictOps.advectorOps.simrefpbetapbinompexppgammaplogispnormppoisprint.advectorprint.Tapeprod.advectorpweibullqbetaqexpqgammaqlogisqnormqweibullrbind.advectorrep.advectorREPORTrowSumssapplysdreportsimrefsolvesplinefunsum.advectorSummary.advectorSummary.simrefsvdt.simrefTapeConfigunstructured

Dependencies:latticeMASSMatrixRcppRcppEigenTMB

Details behind the AD Tape

Rendered fromRTMB-advanced.rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-09-12
Started: 2024-09-12

Introduction to RTMB

Rendered fromRTMB-introduction.rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-09-12
Started: 2024-09-12

Readme and manuals

Help Manual

Help pageTopics
RTMB: R bindings for 'TMB'RTMB-package RTMB
Distributional assignment operator%~%
Convert R object to ADAD
AD apply functionsADapply apply,advector-method sapply,ANY-method
AD complex numbers%*%,adcomplex,ANY-method *.adcomplex +.adcomplex -.adcomplex /.adcomplex ADcomplex adcomplex Arg.adcomplex as.matrix.adcomplex as.vector.adcomplex colSums,adcomplex-method Conj.adcomplex diag,adcomplex,ANY,ANY-method dim.adcomplex dim<-.adcomplex exp.adcomplex fft,adcomplex-method fft,advector-method Im.adcomplex is.matrix.adcomplex length.adcomplex log.adcomplex Mod.adcomplex Ops,adcomplex,advector-method Ops,advector,adcomplex-method Re.adcomplex rep.adcomplex rowSums,adcomplex-method show,adcomplex-method solve,adcomplex,ANY-method sqrt.adcomplex t.adcomplex [.adcomplex [<-.adcomplex
AD aware numeric constructorsADconstruct diag,advector,ANY,ANY-method matrix,advector-method matrix,num.-method
AD adjoint code from RADjoint
AD matrix methods (sparse and dense)%*%,ad,ad-method %*%,ad,anysparse-method %*%,adsparse,adsparse-method %*%,anysparse,ad-method ADmatrix cbind.advector chol.advector colSums,advector-method cov2cor,advector-method crossprod,ad,ad.-method determinant.advector diag,adsparse,missing,missing-method dim,adsparse-method eigen,adcomplex-method eigen,advector-method expm,adsparse-method expm,advector-method rbind.advector rowSums,advector-method solve,ad,ad.-method solve,anysparse,ad.-method solve,num,num.-method svd,advector-method t.adsparse tcrossprod,ad,ad.-method [.adsparse [<-.adsparse
Enable extra RTMB convenience methodsADoverload
The AD vector and its methodsADvector advector aperm.advector as.complex.advector as.double.advector as.vector.advector c.advector Complex.advector diff.advector ifelse,num,ad,ad-method ifelse,num,num,num-method is.finite.advector is.infinite.advector is.na.advector is.nan.advector is.numeric.advector Math.advector mean.advector Ops.advector print.advector prod.advector rep.advector sum.advector Summary.advector [.advector [<-.advector [[.advector
Distributions and special functions for which AD is implementedbesselI,ad,ad,missing-method besselI,num,num,missing-method besselJ,ad,ad-method besselJ,num,num-method besselK,ad,ad,missing-method besselK,num,num,missing-method besselY,ad,ad-method besselY,num,num-method dbeta,ad,ad,ad,missing,logical.-method dbeta,num,num,num,missing,logical.-method dbeta,osa,ANY,ANY,ANY,ANY-method dbeta,simref,ANY,ANY,ANY,ANY-method dbinom,ad,ad,ad,logical.-method dbinom,num,num,num,logical.-method dbinom,osa,ANY,ANY,ANY-method dbinom,simref,ANY,ANY,ANY-method dbinom_robust dcompois dcompois2 dexp,ad,ad.,logical.-method dexp,num,num.,logical.-method dexp,osa,ANY,ANY-method dexp,simref,ANY,ANY-method df,ad,ad,ad,missing,logical.-method df,num,num,num,missing,logical.-method df,osa,ANY,ANY,ANY,ANY-method df,simref,ANY,ANY,ANY,ANY-method dgamma,ad,ad,missing,ad.,logical.-method dgamma,num,num,missing,num.,logical.-method dgamma,osa,ANY,ANY,ANY,ANY-method dgamma,simref,ANY,ANY,ANY,ANY-method Distributions dlgamma dlnorm,ANY,ANY,ANY,ANY-method dlnorm,num,num.,num.,logical.-method dlnorm,osa,ANY,ANY,ANY-method dlogis,ad,ad.,ad.,logical.-method dlogis,num,num.,num.,logical.-method dlogis,osa,ANY,ANY,ANY-method dlogis,simref,ANY,ANY,ANY-method dmultinom,ad,ad.,ad,logical.-method dmultinom,ANY,ANY,ANY,ANY-method dmultinom,num,num.,num,logical.-method dmultinom,osa,ANY,ANY,ANY-method dmultinom,simref,ANY,ANY,ANY-method dnbinom,ad,ad,ad,missing,logical.-method dnbinom,num,num,num,missing,logical.-method dnbinom,osa,ANY,ANY,ANY,ANY-method dnbinom,simref,ANY,ANY,ANY,ANY-method dnbinom2 dnbinom_robust dnorm,ad,ad.,ad.,logical.-method dnorm,num,num.,num.,logical.-method dnorm,osa,ANY,ANY,ANY-method dnorm,simref,ANY,ANY,ANY-method dpois,ad,ad,logical.-method dpois,num,num,logical.-method dpois,osa,ANY,ANY-method dpois,simref,ANY,ANY-method dSHASHo dsn dt,ad,ad,missing,logical.-method dt,num,num,missing,logical.-method dt,osa,ANY,ANY,ANY-method dt,simref,ANY,ANY,ANY-method dtweedie dweibull,ad,ad,ad.,logical.-method dweibull,num,num,num.,logical.-method dweibull,osa,ANY,ANY,ANY-method dweibull,simref,ANY,ANY,ANY-method pbeta,ad,ad,ad,missing,missing,missing-method pbeta,num,num,num,missing,missing,missing-method pbinom,ad,ad,ad,missing,missing-method pbinom,num,num,num,missing,missing-method pexp,ad,ad.,missing,missing-method pexp,num,num.,missing,missing-method pgamma,ad,ad,missing,ad.,missing,missing-method pgamma,num,num,missing,num.,missing,missing-method plogis,advector,missing,missing,missing,missing-method pnorm,ad,ad.,ad.,missing,missing-method pnorm,num,num.,num.,missing,missing-method ppois,ad,ad,missing,missing-method ppois,num,num,missing,missing-method pweibull,ad,ad,ad.,missing,missing-method pweibull,num,num,num.,missing,missing-method qbeta,ad,ad,ad,missing,missing,missing-method qbeta,num,num,num,missing,missing,missing-method qexp,ad,ad.,missing,missing-method qexp,num,num.,missing,missing-method qgamma,ad,ad,missing,ad.,missing,missing-method qgamma,num,num,missing,num.,missing,missing-method qlogis,advector,missing,missing,missing,missing-method qnorm,ad,ad.,ad.,missing,missing-method qnorm,num,num.,num.,missing,missing-method qweibull,ad,ad,ad.,missing,missing-method qweibull,num,num,num.,missing,missing-method
Matrix exponential of sparse matrix multiplied by a vector.expAv
Interpolationinterpol1Dfun interpol2Dfun Interpolation splinefun,advector,missing,ANY,missing-method splinefun,ANY,advector,ANY,missing-method
Multivariate Gaussian densitiesdautoreg dgmrf dmvnorm dseparable MVgauss unstructured
Recursive quantile residualsdim.osa is.array.osa is.matrix.osa length.osa oneStepPredict OSA-residuals [.osa
Simulationas.array.simref diff.simref dim.simref dim<-.simref is.array.simref is.matrix.simref is.na.simref length.simref Math.simref Ops.simref simref Simulation Summary.simref t.simref [.simref [<-.simref
The AD tape$.Tape DataEval GetTape MakeTape print.Tape Tape TapeConfig
Interface to TMBADREPORT checkConsistency getAll MakeADFun OBS REPORT sdreport TMB-interface