{
  "_id": "6a1f1e67b401979e7341fe37",
  "Package": "rema",
  "Type": "Package",
  "Title": "A generalized framework to fit the random effects (RE) model, a\nstate-space random walk model developed at the Alaska Fisheries\nScience Center (AFSC) for apportionment and biomass estimation\nof groundfish and crab stocks.",
  "Version": "1.2.0",
  "Date": "2022-12-15",
  "Authors@R": "c(\nperson(\"Jane\", \"Sullivan\", email = \"jane.sullivan@noaa.gov\", role = c(\"aut\", \"cre\")),\nperson(\"Laurinne\", \"Balstad\", email = \"lbalstad@ucdavis.edu\", role = c(\"aut\", \"ctb\")),\nperson(\"Cole\", \"Monnahan\",  email = \"cole.monnahan@noaa.gov\", role = c(\"ctb\")),\nperson(\"Pete\", \"Hulson\",  email = \"pete.hulson@noaa.gov\", role = c(\"ctb\"))\n)",
  "Description": "This package provides a generalized framework to fit the\nrandom effects (RE) model, a state-space random walk model\ndeveloped at the Alaska Fisheries Science Center (AFSC) for\nsmoothing survey biomass estimates and apportioning catch among\nmanagement areas. REMA is a multivariate extension of the\noriginal single-survey, single-strata RE model that allows the\nuse of multiple strata within a survey and an additional survey\n(e.g. CPUE or relative population numbers) to inform the\nbiomass trend (Hulson et al. 2021). If multi-survey mode is\nturned off, REMA runs the same as the univariate (RE) and\nmultivariate (i.e. multiple area or depth strata; REM) versions\nof the model. REMA was developed in Template Model Builder\n(TMB; Kristensen et al. 2016).",
  "URL": "https://github.com/JaneSullivan-NOAA/rema,\nhttps://afsc-assessments.github.io/rema/",
  "BugReports": "https://github.com/JaneSullivan-NOAA/rema/issues",
  "License": "GPL-3",
  "VignetteBuilder": "knitr",
  "RoxygenNote": "7.3.1",
  "Encoding": "UTF-8",
  "Remotes": [
    "kaskr/tmbstan/tmbstan"
  ],
  "Config/testthat/edition": "3",
  "Config/pak/sysreqs": "cmake make libicu-dev libuv1-dev",
  "Repository": "https://jimianelli.r-universe.dev",
  "Date/Publication": "2025-01-11 00:47:12 UTC",
  "RemoteUrl": "https://github.com/afsc-assessments/rema",
  "RemoteRef": "HEAD",
  "RemoteSha": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-05-16 08:22:05 UTC",
    "User": "root"
  },
  "Author": "Jane Sullivan [aut, cre],\nLaurinne Balstad [aut, ctb],\nCole Monnahan [ctb],\nPete Hulson [ctb]",
  "Maintainer": "Jane Sullivan <jane.sullivan@noaa.gov>",
  "MD5sum": "5e790bec439efb92fbb7073e04a0ed1e",
  "_user": "jimianelli",
  "_type": "src",
  "_file": "rema_1.2.0.tar.gz",
  "_fileid": "b6737d4a131648393f3df40b2c7c2b44611c6d9d60c3bcce23aab49172cb8970",
  "_filesize": 14948902,
  "_sha256": "b6737d4a131648393f3df40b2c7c2b44611c6d9d60c3bcce23aab49172cb8970",
  "_created": "2026-05-16T08:22:05.000Z",
  "_published": "2026-06-02T18:18:15.645Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79141211817,
      "time": 189,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "7031937125"
    },
    {
      "job": 79141211878,
      "time": 208,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "7031938960"
    },
    {
      "job": 79141212011,
      "time": 207,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7031938819"
    },
    {
      "job": 79141211971,
      "time": 189,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7031937008"
    },
    {
      "job": 79141212155,
      "time": 111,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "7031938410"
    },
    {
      "job": 79141212004,
      "time": 225,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "7031944834"
    },
    {
      "job": 79141212060,
      "time": 136,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7031935306"
    },
    {
      "job": 79141211801,
      "time": 401,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7031959284"
    },
    {
      "job": 79141210998,
      "time": 358,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7031918980"
    },
    {
      "job": 79141210930,
      "time": 166,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7366227879"
    },
    {
      "job": 79141212054,
      "time": 182,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "7031936529"
    },
    {
      "job": 79141212117,
      "time": 175,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "7031935569"
    },
    {
      "job": 79141211885,
      "time": 226,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7031940710"
    }
  ],
  "_buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/afsc-assessments/rema",
  "_commit": {
    "id": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
    "author": "JaneSullivan-NOAA <jane.sullivan@noaa.gov>",
    "committer": "JaneSullivan-NOAA <jane.sullivan@noaa.gov>",
    "message": "update cpue oe eqn in the tidy_extra_cv fcn - thx ks\n",
    "time": 1736556432
  },
  "_maintainer": {
    "name": "Jane Sullivan",
    "email": "jane.sullivan@noaa.gov",
    "login": "janesullivan-noaa",
    "uuid": 68303089
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.6.0",
      "role": "Depends"
    },
    {
      "package": "TMB",
      "version": ">= 1.8.1",
      "role": "LinkingTo"
    },
    {
      "package": "RcppEigen",
      "version": ">= 0.3.3.9.1",
      "role": "LinkingTo"
    },
    {
      "package": "TMB",
      "version": ">= 1.7.20",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "version": ">= 1.1.2",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "version": ">= 1.0.2",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "version": ">= 3.3.2",
      "role": "Imports"
    },
    {
      "package": "zoo",
      "version": ">= 1.7",
      "role": "Imports"
    },
    {
      "package": "sessioninfo",
      "version": ">= 1.1.1",
      "role": "Imports"
    },
    {
      "package": "abind",
      "version": ">= 1.4-5",
      "role": "Imports"
    },
    {
      "package": "rmarkdown",
      "version": ">= 2.11",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "version": ">= 1.37",
      "role": "Imports"
    },
    {
      "package": "magrittr",
      "version": ">= 2.0.0",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "cowplot",
      "version": ">= 1.1.1",
      "role": "Suggests"
    },
    {
      "package": "tmbstan",
      "role": "Suggests"
    },
    {
      "package": "bayesplot",
      "role": "Suggests"
    },
    {
      "package": "rstan",
      "role": "Suggests"
    }
  ],
  "_owner": "afsc-assessments",
  "_selfowned": false,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_stars": 9,
  "_contributors": [
    {
      "user": "janesullivan-noaa",
      "count": 172,
      "uuid": 68303089
    },
    {
      "user": "lauriebalstad",
      "count": 7,
      "uuid": 91223414
    }
  ],
  "_userbio": {
    "uuid": 2715618,
    "type": "user",
    "name": "Jim Ianelli"
  },
  "_downloads": {
    "count": 250,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/rema"
  },
  "_devurl": "https://github.com/janesullivan-noaa/rema",
  "_pkgdown": "https://afsc-assessments.github.io/rema/",
  "_searchresults": 38,
  "_topics": [
    "cpp"
  ],
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/readme.html",
    "extra/readme.md",
    "extra/rema.html",
    "manual.pdf"
  ],
  "_realowner": "bzabriskie",
  "_cranurl": false,
  "_releases": [
    {
      "version": "0.0.1",
      "date": "2021-10-28"
    }
  ],
  "_exports": [
    "%>%",
    "check_convergence",
    "check_estimability",
    "compare_rema_models",
    "fit_rema",
    "get_osa_residuals",
    "plot_extra_cv",
    "plot_rema",
    "prepare_rema_input",
    "read_admb_re",
    "read_rep",
    "tidy_extra_cv",
    "tidy_rema"
  ],
  "_help": [
    {
      "page": "pipe",
      "title": "Pipe function",
      "topics": [
        "%>%"
      ]
    },
    {
      "page": "check_convergence",
      "title": "Check convergence of REMA model",
      "topics": [
        "check_convergence"
      ]
    },
    {
      "page": "check_estimability",
      "title": "Check for identifiability of fixed effects Originally provided by https://github.com/kaskr/TMB_contrib_R/TMBhelper Internal function called by 'fit_tmb'.",
      "topics": [
        "check_estimability"
      ]
    },
    {
      "page": "compare_rema_models",
      "title": "Plot REMA model comparisons and return AIC values when appropriate",
      "topics": [
        "compare_rema_models"
      ]
    },
    {
      "page": "extract_fixed",
      "title": "Extract fixed effects Originally provided by https://github.com/kaskr/TMB_contrib_R/TMBhelper Internal function called by 'check_estimability'.",
      "topics": [
        "extract_fixed"
      ]
    },
    {
      "page": "fit_rema",
      "title": "Fit REMA model",
      "topics": [
        "fit_rema"
      ]
    },
    {
      "page": "fit_tmb",
      "title": "Fit TMB model using nlminb",
      "topics": [
        "fit_tmb"
      ]
    },
    {
      "page": "get_osa_residuals",
      "title": "Get one-step-head (OSA)",
      "topics": [
        "get_osa_residuals"
      ]
    },
    {
      "page": "plot_extra_cv",
      "title": "Plot the additional estimated observation error for biomass by strata and/or cpue by strata",
      "topics": [
        "plot_extra_cv"
      ]
    },
    {
      "page": "plot_rema",
      "title": "Plot survey data and model output",
      "topics": [
        "plot_rema"
      ]
    },
    {
      "page": "prepare_rema_input",
      "title": "Prepare input data and parameters for REMA model",
      "topics": [
        "prepare_rema_input"
      ]
    },
    {
      "page": "read_admb_re",
      "title": "Convert ADMB version of the RE model data and output to REMA inputs",
      "topics": [
        "read_admb_re"
      ]
    },
    {
      "page": "read_rep",
      "title": "Read ADMB .rep file and return an R object of type 'list'",
      "topics": [
        "read_rep"
      ]
    },
    {
      "page": "tidy_extra_cv",
      "title": "Tidy estimates of extra biomass or CPUE index CV",
      "topics": [
        "tidy_extra_cv"
      ]
    },
    {
      "page": "tidy_rema",
      "title": "Tidy REMA model output",
      "topics": [
        "tidy_rema"
      ]
    }
  ],
  "_pkglogo": "https://github.com/afsc-assessments/rema/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/afsc-assessments/rema/raw/HEAD/README.md",
  "_rundeps": [
    "abind",
    "base64enc",
    "bslib",
    "cachem",
    "cli",
    "cpp11",
    "digest",
    "dplyr",
    "evaluate",
    "farver",
    "fastmap",
    "fontawesome",
    "fs",
    "generics",
    "ggplot2",
    "glue",
    "gtable",
    "highr",
    "htmltools",
    "isoband",
    "jquerylib",
    "jsonlite",
    "knitr",
    "labeling",
    "lattice",
    "lifecycle",
    "magrittr",
    "Matrix",
    "memoise",
    "mime",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "rappdirs",
    "RColorBrewer",
    "Rcpp",
    "RcppEigen",
    "rlang",
    "rmarkdown",
    "S7",
    "sass",
    "scales",
    "sessioninfo",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "tinytex",
    "TMB",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr",
    "xfun",
    "yaml",
    "zoo"
  ],
  "_sysdeps": [
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "ex2_cpue.Rmd",
      "filename": "ex2_cpue.html",
      "title": "Fitting to an additional CPUE survey",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Model 1: Fit to the biomass and CPUE survey through the estimation of a scaling parameter $q$",
        "A comparison of the ADMB and TMB models",
        "Model 2: Estimating additional observation error in the two surveys",
        "Model comparison",
        "Model selection",
        "Apportionment results"
      ],
      "created": "2022-08-15 02:30:57",
      "modified": "2023-08-31 00:40:59",
      "commits": 5
    },
    {
      "source": "ex1_basics.Rmd",
      "filename": "ex1_basics.html",
      "title": "REMA basics",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The rema workflow:",
        "Example 1: Univariate random effects (RE) model with a single survey and stratum",
        "Example 2: Multivariate random effects model (REM) with a single survey and multiple strata"
      ],
      "created": "2022-06-16 15:30:56",
      "modified": "2023-08-30 19:16:56",
      "commits": 4
    },
    {
      "source": "rema_equations.Rmd",
      "filename": "rema_equations.html",
      "title": "REMA model equations",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Base model structure for a single survey and stratum",
        "Extending to multiple biomass survey strata",
        "Addition of an auxiliary catch per unit effort (CPUE) survey",
        "The ADMB version of REMA",
        "Estimation of additional observation error",
        "Exploration of the Tweedie distribution for zero biomass observations",
        "Experimental One-Step Ahead (OSA) residuals",
        "References"
      ],
      "created": "2022-08-15 02:30:57",
      "modified": "2025-01-07 23:26:42",
      "commits": 10
    },
    {
      "source": "ex4_model_validation.Rmd",
      "filename": "ex4_model_validation.html",
      "title": "REMA model validation",
      "author": "Laurinne J Balstad, Jane Sullivan, and Cole Monnahan",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Background",
        "A testing framework for REMA model validation",
        "Prepare data for each stock here",
        "1. Simulation self-test: Can we recover parameters without bias?",
        "2. Residual analysis",
        "3. Laplace approximation: Are the model assumptions related to random effects estimation reasonable?",
        "4. Parameter correlation: Are the model parameters identifiable and non-redundant?",
        "Results of parameter correlation analysis",
        "5. Is the GOA Thornyhead model really converged?",
        "When should we care about failed model diagnostics?",
        "Preliminary recommendations",
        "References"
      ],
      "created": "2024-08-21 00:38:43",
      "modified": "2024-12-04 00:24:02",
      "commits": 18
    },
    {
      "source": "ex3_zeros.Rmd",
      "filename": "ex3_zeros.html",
      "title": "Strategies for handling zero biomass observations",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Model 1: Zeros as NAs",
        "Model 2: Add a small constant",
        "Model 3: Tweedie distribution",
        "Compare model results"
      ],
      "created": "2022-08-15 02:30:57",
      "modified": "2024-08-21 01:58:59",
      "commits": 2
    }
  ],
  "_score": 4.931966114728173,
  "_indexed": false,
  "_nocasepkg": "rema",
  "_universes": [
    "jimianelli"
  ],
  "_indexurl": "https://bzabriskie.r-universe.dev/rema",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.0",
      "date": "2026-05-16T08:25:09.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "8b6bca71478986831864f2e4231d2ef729b939c4b76553d84cb3c7022ca9d705",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.0",
      "date": "2026-05-16T08:25:23.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "996ffdd8cb8477724aa9487bdd4db0147341d0aa048b03b78dc86f33f62d8e58",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.2.0",
      "date": "2026-05-16T08:25:30.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "b23274dc5842b4b5363d057d1f9c48d305492e4bd3045db8b13108e46715f9ab",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.2.0",
      "date": "2026-05-16T08:25:08.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "3095d677451acdd43e57f4cf66107599f5b8776021c0e32ded3826d699ccd050",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.0",
      "date": "2026-05-16T08:25:46.000Z",
      "arch": "aarch64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "7aea886849cc9ed00f69ea8d3282c5abccac52ce26d88b5600115aa612761d69",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.0",
      "date": "2026-05-16T08:26:03.000Z",
      "arch": "x86_64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "eceb396e4e2ecb07ea2b95406a8b173b16181012273752ac7575589596c5764e",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.2.0",
      "date": "2026-05-16T08:25:03.000Z",
      "arch": "aarch64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "7520f0dcac64fce9fb339c6a8f9eec773e4bccdd4c31d720783d6592e89bb44c",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.2.0",
      "date": "2026-05-16T08:28:00.000Z",
      "arch": "x86_64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "4ce18e98ab7a32b886c3121ba7d98bc0d70a3c3749d821d0649d15703fd3695c",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.2.0",
      "date": "2026-05-16T08:24:23.000Z",
      "arch": "x86_64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "e17c26976af6f76683649396b4e05c088101db7c1922629271738ba37da16949",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.2.0",
      "date": "2026-05-16T08:24:22.000Z",
      "arch": "x86_64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "4e34341029db67f4dfe0235ab1df9ce93364206fe066bbc69ac4dca95d4c1f9b",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.2.0",
      "date": "2026-05-16T08:25:01.000Z",
      "arch": "x86_64",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "dbbe51eae5d316c66bfd2938393ebdd2bc6dabd032f88f64aea149dcf8aca7b3",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.2.0",
      "date": "2026-06-02T18:17:38.000Z",
      "arch": "emscripten",
      "commit": "9d801300099041f7f54c1f94dd6de42ab3d85eb1",
      "fileid": "f274634304db27a6182d1f9de79d73711e9a3a1c5bf2f7a3cf727f506191077d",
      "status": "success",
      "buildurl": "https://github.com/r-universe/jimianelli/actions/runs/25957105816"
    }
  ]
}