Learn R Programming

rACMEMEEV (version 1.0.1)

acme_model: Model the Data

Description

Using the methodology generated by Muoko et. al (see README for full citation), run the modelling with the JAGS sampler. This function accepts a number of different arguments, but defaulted arguments are assumed to be best for most systems. Obviously, if there is prior knowledge, this can be adjusted at the user's own discretion.

Usage

acme_model(
  data,
  columns,
  n_chains = 1,
  n_adapt_steps = 500,
  n_burn = 1000,
  n_thin = 1,
  n_steps = 10000,
  seed = 42,
  stan = FALSE
)

Value

List with all the appropriate things needed for modelling with JAGS

Arguments

data

data.frame The data to format

columns

vector The columns to target

n_chains

numeric Number of chains to run, default = 1

n_adapt_steps

numeric Number of adapt steps to run, default = 500

n_burn

numeric Number of draws to burn at the start, default = 1000

n_thin

numeric Thinning factor for the draws, default = 1

n_steps

numeric The total number of draws to run, default = 10,000

seed

numeric The random seed to set

stan

boolean If you would like to use the experimental Stan backend

Examples

Run this code
data <- data.frame(list("fruit" = c(1, 2), "veg" = c(3, 4)))
acme_model(data, names(data))

Run the code above in your browser using DataLab