R/simple_stan.R

#' Try to run simple test
#'
#' @return a stanfit model
#' @useDynLib teststan, .registration = TRUE
#' @import rstan
#' @importFrom stats rnorm
#' @export
#'
simple_stan = function(){
  y = rnorm(20)
  dat =  list(N = 20, y = y);
  stanfit = stanmodels$test1
  sampling(stanfit, data = dat, iter = 200, chains = 1,
           show_messages = FALSE)
}
dmenne/teststan documentation built on May 15, 2019, 9:33 a.m.