{
  "_id": "6b0047284c685b5adf82af42",
  "Package": "ngvb",
  "Type": "Package",
  "Title": "Latent Non-Gaussian Modelling with 'INLA' and Variational Bayes",
  "Version": "0.2.1",
  "Authors@R": "person(\"Rafael\", \"Cabral\", email = \"rafael.medeiros.cabral@gmail.com\",\nrole = c(\"aut\", \"cre\", \"cph\"))",
  "Description": "Diagnoses whether the latent Gaussian assumption of a\nmodel fitted with the 'INLA' package is adequate, and fits\nlatent non-Gaussian extensions that relax it. The function\nng.check() reports a Bayes-factor sensitivity diagnostic that\nsays whether, and where, the Gaussian assumption is inadequate;\nngvb() then fits the non-Gaussian model by a variational-Bayes\nloop around 'INLA', adding local flexibility only where the\ndata support it. A single unified engine implements the\nconditional precision Q(theta, V) = D(theta)^T diag(1/V)\nD(theta) and owns its normalizing constant, and a model\nregistry covers iid, random-walk, autoregressive,\nOrnstein-Uhlenbeck, intrinsic-CAR (besag),\nsimultaneous-autoregression, 'SPDE'/Matern and seasonal models.\nMethods follow Cabral, Bolin and Rue (2024)\n<doi:10.1080/01621459.2023.2296704> and Cabral, Bolin and Rue\n(2025) <doi:10.1093/jrsssb/qkae107>.",
  "License": "GPL (>= 3)",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Additional_repositories": "https://inla.r-inla-download.org/R/stable",
  "URL": "https://github.com/rafaelcabral-ai/ngvb,\nhttps://rafaelcabral-ai.github.io/ngvb/",
  "BugReports": "https://github.com/rafaelcabral-ai/ngvb/issues",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Config/Needs/website": "rmarkdown",
  "Roxygen": "list(roclets = c(\"rd\"))",
  "RoxygenNote": "7.3.3",
  "Repository": "https://rafaelcabral-ai.r-universe.dev",
  "Date/Publication": "2026-09-19 06:08:57 UTC",
  "RemoteUrl": "https://github.com/rafaelcabral-ai/ngvb",
  "RemoteRef": "HEAD",
  "RemoteSha": "116763fa5dd55dea41a1c76d52a71caac61b1501",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-11-20 13:07:48 UTC",
    "User": "root"
  },
  "Author": "Rafael Cabral [aut, cre, cph]",
  "Maintainer": "Rafael Cabral <rafael.medeiros.cabral@gmail.com>",
  "_user": "rafaelcabral-ai",
  "_type": "src",
  "_file": "ngvb_0.2.1.tar.gz",
  "_fileid": "https://r2.ropensci.org/7901c80aee30f4b9d7516f5197c9e005df33ffb6025bc1112e687c9084419a4b",
  "_filesize": 457592,
  "_sha256": "7901c80aee30f4b9d7516f5197c9e005df33ffb6025bc1112e687c9084419a4b",
  "_expires": "2027-02-28T13:12:06.000Z",
  "_created": "2026-11-20T13:07:48.000Z",
  "_published": "2026-11-20T13:12:08.431Z",
  "_upstream": "https://github.com/rafaelcabral-ai/ngvb",
  "_status": "success",
  "_maintainer": {
    "name": "Rafael Cabral",
    "email": "rafael.medeiros.cabral@gmail.com",
    "login": "rafaelcabral-ai",
    "linkedin": "in/rafael-medeiros-cabral",
    "description": "MTS @ Axiom Math",
    "uuid": 254837935
  },
  "_jobs": [
    {
      "job": 136306506574,
      "time": 138,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "14631047081"
    },
    {
      "job": 136306506561,
      "time": 158,
      "config": "linux-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14630384801"
    },
    {
      "job": 136306506557,
      "time": 214,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "14631381467"
    },
    {
      "job": 136306506536,
      "time": 215,
      "config": "macos-release-arm64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14630893053"
    },
    {
      "job": 136304837809,
      "time": 200,
      "config": "source",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14630797669"
    },
    {
      "job": 136306506521,
      "time": 132,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "14631072366"
    },
    {
      "job": 136306506542,
      "time": 112,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "14630503078"
    },
    {
      "job": 136306506625,
      "time": 110,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "14630962637"
    },
    {
      "job": 136306506801,
      "time": 93,
      "config": "windows-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "14630797989"
    }
  ],
  "_buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422",
  "_commit": {
    "id": "116763fa5dd55dea41a1c76d52a71caac61b1501",
    "author": "Rafael Cabral <rafael.medeiros.cabral@gmail.com>",
    "committer": "Rafael Cabral <rafael.medeiros.cabral@gmail.com>",
    "message": "Address CRAN review: document fitted.ngvb, stop touching .GlobalEnv\n\nLeonore Hochhauser's 2026-08-27 review raised two points.\n\n1. fitted.ngvb.Rd had no \\value. It now states the class, what a row is,\n   which columns appear, and the NULL case. It was the only exported\n   object missing one.\n\n2. \"Do not modify the global environment (e.g. by using <<-)\". Two\n   distinct offenders:\n\n   - R/detect.R used <<- in two formula walkers. These were in fact\n     harmless -- `found` is a local of the enclosing frame, so the\n     assignment never reached .GlobalEnv, and the CRAN cookbook says as\n     much -- but the operator draws the eye, so both now hold their state\n     in an explicit local environment.\n\n   - R/api.R was the real violation and was not cited: ngvb() assigned\n     its engine objects into the user's workspace and deleted them again\n     on exit. The comment there claimed INLA required it, which is only\n     half true. inla() resolves a formula's `model =` in its\n     .parent.frame argument; fit$.args carries the .parent.frame captured\n     at the user's original inla() call, which is .GlobalEnv, and\n     do.call() passed it straight through. Overriding it to a private\n     environment parented on globalenv() sends the lookup there while\n     everything else the formula references still resolves. The two\n     on.exit() cleanups are gone with it.\n\nVerified against a real INLA install: ngvb(), ngvb_sample() and\nbayes.factor() all run, ls(globalenv()) is unchanged across a full\nngvb() call, and the suite passes with the INLA-backed tests actually\nrunning (108 passed, 0 failed, 0 skipped). R CMD check --as-cran on the\nrebuilt tarball: 0 errors, 0 warnings, 1 note (the expected new-submission\nand INLA-not-mainstream note).\n\nVersion bumped to 0.2.1 for resubmission.\n\nCo-Authored-By: Claude Opus 5 <noreply@anthropic.com>\n",
    "time": 1789798137
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1",
      "role": "Depends"
    },
    {
      "package": "Matrix",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "codetools",
      "role": "Imports"
    },
    {
      "package": "GIGrvg",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "patchwork",
      "role": "Imports"
    },
    {
      "package": "INLA",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "fmesher",
      "role": "Suggests"
    },
    {
      "package": "sf",
      "role": "Suggests"
    },
    {
      "package": "spData",
      "role": "Suggests"
    },
    {
      "package": "spdep",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "bslib",
      "role": "Suggests"
    }
  ],
  "_owner": "rafaelcabral-ai",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-27",
      "n": 6
    },
    {
      "week": "2026-28",
      "n": 24
    },
    {
      "week": "2026-32",
      "n": 1
    },
    {
      "week": "2026-33",
      "n": 2
    },
    {
      "week": "2026-34",
      "n": 4
    },
    {
      "week": "2026-38",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "rafaelcabral-ai",
      "count": 38,
      "uuid": 254837935
    }
  ],
  "_userbio": {
    "uuid": 254837935,
    "type": "user",
    "name": "Rafael Cabral",
    "followers": 3,
    "description": "MTS @ Axiom Math"
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/ngvb"
  },
  "_devurl": "https://github.com/rafaelcabral-ai/ngvb",
  "_pkgdown": "https://rafaelcabral-ai.github.io/ngvb/",
  "_rbuild": "4.6.2",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/ngvb.html",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_homeurl": "https://github.com/rafaelcabral-ai/ngvb",
  "_realowner": "rafaelcabral-ai",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.2.1",
      "date": "2026-11-19"
    }
  ],
  "_authors": [
    {
      "name": "Rafael Cabral",
      "email": "rafael.medeiros.cabral@gmail.com",
      "role": [
        "aut",
        "cre",
        "cph"
      ]
    }
  ],
  "_exports": [
    "areal.plot",
    "bayes.factor",
    "geo.plot",
    "ng.check",
    "ngvb",
    "ngvb_custom",
    "ngvb_operator",
    "ngvb_precision",
    "ngvb_rgeneric",
    "ngvb_sample"
  ],
  "_datasets": [
    {
      "name": "jumpts",
      "title": "Simulated time series with two jumps",
      "object": "jumpts",
      "class": [
        "data.frame"
      ],
      "fields": [
        "x",
        "y"
      ],
      "rows": 100,
      "table": true,
      "tojson": true
    },
    {
      "name": "Orthodont",
      "title": "Orthodontic growth data",
      "object": "Orthodont",
      "class": [
        "data.frame"
      ],
      "fields": [
        "subject",
        "Female",
        "time",
        "value",
        "tF",
        "subject2"
      ],
      "rows": 108,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "areal.plot",
      "title": "Plot areal (regional) data on a map.",
      "topics": [
        "areal.plot"
      ]
    },
    {
      "page": "bayes.factor",
      "title": "Bayes factor of a latent non-Gaussian model against its Gaussian counterpart.",
      "topics": [
        "bayes.factor",
        "bayes.factor.ngvb",
        "bayes.factor.ngvb.samples"
      ]
    },
    {
      "page": "density.ngvb",
      "title": "Posterior density of a component's non-Gaussianity parameter eta.",
      "topics": [
        "density.ngvb"
      ]
    },
    {
      "page": "fitted.ngvb",
      "title": "Fitted values of the underlying INLA fit.",
      "topics": [
        "fitted.ngvb"
      ]
    },
    {
      "page": "geo.plot",
      "title": "Plot geostatistical (point-referenced) data, optionally over a mesh.",
      "topics": [
        "geo.plot"
      ]
    },
    {
      "page": "jumpts",
      "title": "Simulated time series with two jumps",
      "topics": [
        "jumpts"
      ]
    },
    {
      "page": "ng.check",
      "title": "Check the latent Gaussian assumption of an INLA fit.",
      "topics": [
        "ng.check"
      ]
    },
    {
      "page": "ngvb",
      "title": "Fit a latent non-Gaussian model from a fitted INLA (LGM) object.",
      "topics": [
        "ngvb"
      ]
    },
    {
      "page": "ngvb_custom",
      "title": "Define a custom latent non-Gaussian model from a precision \"square root\".",
      "topics": [
        "ngvb_custom"
      ]
    },
    {
      "page": "ngvb_operator",
      "title": "Construct an ngvb operator descriptor.",
      "topics": [
        "ngvb_operator"
      ]
    },
    {
      "page": "ngvb_precision",
      "title": "Conditional precision matrix Q(theta, V) for an operator (main-process helper).",
      "topics": [
        "ngvb_precision"
      ]
    },
    {
      "page": "ngvb_rgeneric",
      "title": "Build an INLA rgeneric model for an ngvb operator at a fixed V.",
      "topics": [
        "ngvb_rgeneric"
      ]
    },
    {
      "page": "ngvb_sample",
      "title": "Sample the mixing variables and refit INLA at each draw.",
      "topics": [
        "ngvb_sample"
      ]
    },
    {
      "page": "Orthodont",
      "title": "Orthodontic growth data",
      "topics": [
        "Orthodont"
      ]
    },
    {
      "page": "plot.ngvb",
      "title": "Diagnostic plots for an ngvb fit.",
      "topics": [
        "plot.ngvb"
      ]
    },
    {
      "page": "plot.ngvb.check",
      "title": "Diagnostic plots for a latent-Gaussianity check.",
      "topics": [
        "plot.ngvb.check"
      ]
    },
    {
      "page": "summary.ngvb",
      "title": "Summary of an ngvb fit: the underlying INLA summaries plus, per component, the non-Gaussianity parameter and the most strongly down-weighted (outlying) indices.",
      "topics": [
        "summary.ngvb"
      ]
    },
    {
      "page": "summary.ngvb.samples",
      "title": "Importance-weighted posterior summary of the sampled fits.",
      "topics": [
        "summary.ngvb.samples"
      ]
    }
  ],
  "_readme": "https://github.com/rafaelcabral-ai/ngvb/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "codetools",
    "cpp11",
    "farver",
    "ggplot2",
    "GIGrvg",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lattice",
    "lifecycle",
    "Matrix",
    "patchwork",
    "R6",
    "RColorBrewer",
    "rlang",
    "S7",
    "scales",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "ngvb_pkg.Rmd",
      "filename": "ngvb_pkg.html",
      "title": "ngvb: latent non-Gaussian models with R-INLA",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Vignettes",
        "Installing INLA",
        "References"
      ],
      "created": "2026-08-09 08:20:32",
      "modified": "2026-08-09 08:20:32",
      "commits": 1
    }
  ],
  "_score": 4.477121254719663,
  "_indexed": true,
  "_nocasepkg": "ngvb",
  "_universes": [
    "rafaelcabral-ai"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-11-20T13:09:53.000Z",
      "distro": "resolute",
      "commit": "116763fa5dd55dea41a1c76d52a71caac61b1501",
      "fileid": "https://r2.ropensci.org/412d38204dfbdc4c5fb2f91aad1b18e8149341932eecc7f6d8eeb074af473f10",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422"
    },
    {
      "r": "4.6.2",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-11-20T13:10:08.000Z",
      "distro": "resolute",
      "commit": "116763fa5dd55dea41a1c76d52a71caac61b1501",
      "fileid": "https://r2.ropensci.org/070d014707a6ec4ee1233877f428475d9948d3951a29fcfb154d0e60689411f9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-11-20T13:10:46.000Z",
      "commit": "116763fa5dd55dea41a1c76d52a71caac61b1501",
      "fileid": "https://r2.ropensci.org/e3522ebe6f0bf40d22aed3f2217ae3a37cfb1d5db34f2fa0b4aab4f08dc176a4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422"
    },
    {
      "r": "4.6.2",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-11-20T13:10:32.000Z",
      "commit": "116763fa5dd55dea41a1c76d52a71caac61b1501",
      "fileid": "https://r2.ropensci.org/c6c0c77abad5be1c9d3f90975fe771b23aa0366bb98f7053c834626e73476322",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.2.1",
      "date": "2026-11-20T13:10:15.000Z",
      "commit": "116763fa5dd55dea41a1c76d52a71caac61b1501",
      "fileid": "https://r2.ropensci.org/6ac450b5c40b2017499dd1e45e73a08f2d0077a7ad3bb91a7145b37f542c6751",
      "status": "success",
      "buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-11-20T13:09:23.000Z",
      "commit": "116763fa5dd55dea41a1c76d52a71caac61b1501",
      "fileid": "https://r2.ropensci.org/0141855791f8ca22833754ce5aa9ef22f32a9de2794a9863869e06afc1d8c7ff",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-11-20T13:09:18.000Z",
      "commit": "116763fa5dd55dea41a1c76d52a71caac61b1501",
      "fileid": "https://r2.ropensci.org/8fd79bae186d1b06e70056ff5efa74c130733b09a76071053f5dfb758d8aec14",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422"
    },
    {
      "r": "4.6.2",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-11-20T13:09:08.000Z",
      "commit": "116763fa5dd55dea41a1c76d52a71caac61b1501",
      "fileid": "https://r2.ropensci.org/490066a90cb4bdfd49b955fa754f47466a8f27b91213fd9be5c9e69567bb9ed6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/rafaelcabral-ai/actions/runs/44741107422"
    }
  ]
}