Skip to content

Instantly share code, notes, and snippets.

@medewitt
Created April 28, 2020 10:42
Show Gist options
  • Save medewitt/12097fa2527bc529738000f69f6074d9 to your computer and use it in GitHub Desktop.
Save medewitt/12097fa2527bc529738000f69f6074d9 to your computer and use it in GitHub Desktop.
wrapping Imperial College
#' Stan Model Base General
#'
#' @param dat the dat sent to the model
#' @param iter 2400
#' @param warmup 1000
#' @param chains 4
#' @param control default controls
#' @param ... Arguments passed to `rstan::sampling` (e.g. iter, chains).
#' @return An object of class `stanfit` returned by `rstan::sampling`
#' @export
#'
#'
stan_icl_general <- function(dat,iter = 2400, warmup = 1000, chains = 4,
control = list(adapt_delta = 0.95, max_treedepth = 13), ...){
out <- rstan::sampling(stanmodels$icl_general,
data = dat,
iter = iter,
warmup = warmup,
chains = chains,
control = control, ...)
return(out)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment