Skip to contents

The movement model, momo, allows estimation of habitat preferences and fine-scale movement rates using various types of tagging data. It supports flexible spatiotemporal modeling with options for Kalman filter or matrix exponential approaches, and includes tools for data preparation, model fitting, and visualization.

Usage

fit.momo(
  dat,
  conf = NULL,
  par = NULL,
  map = NULL,
  run = TRUE,
  lower = get.lower.bounds(par),
  upper = get.upper.bounds(par),
  rel.tol = 1e-10,
  do.sdreport = TRUE,
  do.report = TRUE,
  use.expm = NULL,
  use.rel.events = NULL,
  verbose = TRUE,
  ...
)

Arguments

dat

data frame with input data as produced by the function check.momo.data.

conf

configuration list as produced by the function def.conf. If NULL (default), def.conf is used to generate the default configuration list based on the input data.

par

parameter list with initial values as produced by the function def.par. If NULL (default), def.par is used to generate the default parameter list based on the input data and configuration list.

map

list with parameter mapping as produced by the function def.map. If NULL (default), def.map is used to generate the default mapping list based on the input data and configuration and parameter lists.

run

logical; If FALSE, the AD object is returned with the optimization. Default: FALSE.

lower

by default, get.lower.bounds is used.

upper

by default, get.upper.bounds is used.

rel.tol

option passed to stats::nlminb sets the convergence criteria. Default: 1e-10.

do.sdreport

logical; If FALSE, RTMB::sdreport is not run and no parameter uncertainties are returned. Default: TRUE.

do.report

logical; If FALSE, obj$report() is not run and RTMB variables might not be reported. Default: TRUE.

use.expm

logical; allows to overwrite setting in configuration list (conf$use.expm). If NULL, setting from configuration list is used. Default: NULL.

use.rel.events

logical; allows to overwrite setting in configuration list (conf$use.rel.events). If NULL, setting from configuration list is used. Default: NULL.

verbose

if TRUE, print information to console. Default: TRUE.

...

extra arguments to RTMB::MakeADFun.

Value

A list of class momo.fit.

Examples

data(skjepo)

fit <- fit.momo(skjepo)
#> Building the model, that can take a few minutes.
#> Model built (1.2min). Minimizing neg. loglik.
#>   0:     2024137.4:  0.00000  0.00000 -4.60517 -4.60517
#>   1:     822806.96: -0.00442984 0.00317523 -3.72887 -4.12343
#>   2:     429339.57: -0.0143688 0.0103040 -3.46755 -3.15826
#>   3:     214568.29: -0.414157 0.297082 -2.59723 -3.13659
#>   4:     100599.53: -0.417775 0.299686 -2.14436 -2.24503
#>   5:     45369.701: -0.419581 0.300984 -1.14453 -2.26330
#>   6:     22178.448: -0.430474 0.308792 -0.673123 -1.38149
#>   7:     10381.920: -0.429132 0.307830 0.326756 -1.36604
#>   8:     7703.8075: -0.390426 0.280031 0.687032 -0.434410
#>   9:     5160.7658: -0.400396 0.287180  1.67321 -0.599652
#>  10:     4211.5318: -0.383993 0.275400  2.44868 -1.23071
#>  11:     4115.4272: -1.09732 0.786486  2.53610 -1.70221
#>  12:     4074.3916: -1.10233 0.790075  2.81142 -1.72440
#>  13:     4065.1856: -1.31075 0.939500  2.76596 -1.81660
#>  14:     4056.6811: -1.50508  1.07884  2.82306 -1.94264
#>  15:     4008.7287: -7.10373  5.09377  2.81722 -2.24258
#>  16:     3888.0840: -28.7389  20.6409  2.74378 -2.92450
#>  17:     3797.7523: -61.7620  44.4425  2.70626 -3.92068
#>  18:     3788.9090: -73.9539  53.2874  2.72004 -4.31690
#>  19:     3788.5840: -76.4753  55.1851  2.72451 -4.40093
#>  20:     3788.5758: -76.7968  55.4968  2.72488 -4.41174
#>  21:     3788.5708: -76.8688  55.6705  2.72514 -4.41479
#>  22:     3788.5471: -76.9244  56.4203  2.72574 -4.42017
#>  23:     3788.4882: -76.5814  58.2710  2.72681 -4.41943
#>  24:     3788.3478: -75.0263  62.5283  2.72820 -4.39483
#>  25:     3787.9751: -69.7242  73.5093  2.73032 -4.29317
#>  26:     3786.9841: -53.7325  102.254  2.73306 -3.96372
#>  27:     3783.9822: -6.78135  180.581  2.73516 -2.96278
#>  28:     3782.1413:  12.1685  211.810  2.72170 -2.55314
#>  29:     3779.7960:  27.3465  236.562  2.62458 -2.22205
#>  30:     3778.6891:  34.8400  248.696  2.63953 -2.05283
#>  31:     3778.6436:  43.1351  260.296  2.59814 -1.87791
#>  32:     3772.9536:  41.4752  235.934  2.57375 -1.92085
#>  33:     3772.1120:  41.3211  228.291  2.60112 -1.93531
#>  34:     3772.0141:  41.4141  228.973  2.60547 -1.95278
#>  35:     3771.4779:  45.7515  236.710  2.61740 -2.00955
#>  36:     3770.4104:  58.6265  256.986  2.63126 -2.08453
#>  37:     3767.2135:  107.441  330.688  2.65901 -2.26742
#>  38:     3760.1266:  242.336  530.117  2.69961 -2.66377
#>  39:     3746.3078:  608.548  1069.34  2.74263 -3.65099
#>  40:     3737.6921:  972.726  1609.93  2.70580 -4.52469
#>  41:     3737.3458:  1050.31  1727.02  2.69231 -4.69658
#>  42:     3737.3369:  1053.92  1732.83  2.69501 -4.70742
#>  43:     3737.3357:  1052.17  1730.60  2.69494 -4.70071
#>  44:     3737.3356:  1052.78  1731.53  2.69491 -4.70114
#>  45:     3737.3345:  1055.23  1735.27  2.69476 -4.69771
#>  46:     3737.3318:  1059.01  1741.04  2.69451 -4.67925
#>  47:     3737.3237:  1065.96  1751.67  2.69397 -4.60911
#>  48:     3737.2788:  1087.59  1784.82  2.69204 -4.27413
#>  49:     3734.9657:  1174.02  1917.48  2.68374 -2.78196
#>  50:     3732.5797:  1208.59  1970.55  2.67256 -2.18511
#>  51:     3728.9368:  1219.06  1986.62  2.57594 -1.99915
#>  52:     3728.7881:  1222.13  1991.33  2.58184 -1.93498
#>  53:     3728.7660:  1225.20  1996.03  2.54905 -1.88627
#>  54:     3728.6684:  1223.68  1993.67  2.56151 -1.89732
#>  55:     3728.6452:  1222.16  1991.31  2.56373 -1.91402
#>  56:     3728.1504:  1198.13  1953.29  2.55439 -1.90159
#>  57:     3727.1443:  1112.69  1820.90  2.56337 -1.90666
#>  58:     3726.9649:  1043.92  1717.10  2.55323 -1.88191
#>  59:     3726.9565:  1049.61  1725.43  2.55810 -1.89015
#>  60:     3726.9564:  1049.86  1725.86  2.55765 -1.88928
#>  61:     3726.9564:  1049.82  1725.79  2.55765 -1.88929
#> Minimization done (0.056min). Model converged. Estimating uncertainty.