Skip to content
/ inlatools Public

An R package with useful functions to diagnose INLA models

License

Notifications You must be signed in to change notification settings

inbo/inlatools

Repository files navigation

The inlatools package

Project Status: Active – The project has reached a stable, usable state and is being actively developed. lifecycle Licence minimal R version codecov

Rationale

The inlatools package provides a set of function which can be useful to diagnose INLA models.

  • calculate Pearson residuals
  • simulation based checks for over- or underdispersion
  • simulation based checks for the distribution
  • visualise the effect of the variance or precision on random effects
    • random intercept
    • first order random walk
    • second order random walk

Installation

ip <- rownames(installed.packages())
if (!"remotes" %in% ip) {
  install.packages("remotes")
}
if (!"INLA" %in% ip) {
  install.packages(
    "INLA", 
    repos = c(getOption("repos"), "https://inla.r-inla-download.org/R/stable")
  )
}
remotes::install_github("inbo/inlatools")

Documentation

All documentation is available at the package website: https://inlatools.netlify.app. This website contains an overview of all available functions. Click on the name the function to open the corresponding help file. The vignettes illustrate

Folder structure

  • R: The source scripts of the R functions with documentation in Roxygen format
  • man: The helpfile in Rd format
  • test: unit tests using the testthat framework
  • vignettes: the source code of the vignettes
inlatools
├── man
├── R
├─┬ tests
│ └── testthat
└── vignettes