Skip to content

This package contains JAGS models and associated functionality for use with SpARK project data

Notifications You must be signed in to change notification settings

boydorr/SpARKjags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpARKjags

test-build codecov CodeFactor

Table of contents

General info

This package contains JAGS models and associated functionality for use with SpARK project data.

Setup

To install this package in R, run:

install.packages("devtools")
devtools::install_github("soniamitchell/SpARKjags")

Note that you must have access to the SpARK project datasets for any of this code to work.

How to

List all of the models included in the SpARKjags package

list_models()

Run one of the SpARKjags models

# Generate JAGS input dataset
data <- jags_data(classification = "Carbapenem",
                  categories = "human",
                  pathogen = "Klebsiella pneumoniae",
                  removeQuinPen = T)

# Run the model                  
path <- run_SpARKjags_model(data = data,
                            SpARKjags_model = "individual_models/h.R",
                            save_to = "results/individual_models")

The run_SpARKjags_model() function will return the path of the model output.

Read model output into R

results <- get_model(path = path)

About

This package contains JAGS models and associated functionality for use with SpARK project data

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages