This package runs a Shiny app that helps you estimate disease risk across small geographical areas using Bayesian spatial modeling. And yes, you can use your own data.
It's built with the aim to support cancer surveillance and disease mapping but works with any area-based disease event data.
Bayesian computation is done with integrated nested Laplace approximation (INLA). We use the amazing package created by the R-INLA team. Check out their website and install their package from the R-INLA website.
Updates to come!
- Checking for INLA model failures
- Modified PIT calculations
- New posterior predictive checks including observed vs. fitted counts, PIT historgram and Pearson residuals.
First things first.. you'll need the INLA package by R-INLA. I recommend running either of these lines on your machine for the testing or stable versions. FYI R-INLA is hosted on R-INLA website and not on CRAN or github.
install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)
install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/testing"), dep=TRUE)
smallareamApp is not available on CRAN. You can install it now through Github via my Github repo with:
devtools::install_github("jdsimkin04/smallareamapp")
IMPORTANT! There are quite a few dependencies for this... so it may take long.
The app has one function... yes it's that simple. runmApp() will launch the shiny application and the rest is done through the app.
library(smallareamapp)
runmApp()
smallareamApp analyzes your data. There's one catch though. The data has to be set up exactly right for the app to accept it. I know it's not ideal... but I'm working on that! For the meantime, there's a template table on the app that shows you what it is expecting. It includes area name, cancer type, sex, observed counts, age-adjusted expected counts, standardized incidence ratios, etc. I use the epitool for indirect age-standardization.
I've put together a package installation and walkthrough guide here.