R/model_code.R

Defines functions model_code

Documented in model_code

#' @title JAGS Model Generated by HypMuVar
#'
#' @param object \code{melsm} object
#'
#' @return printed JAGS model
#' @export
#'
#' @examples
#' \dontrun{
#' dat <- nlme::Orthodont
#' fit <- melsm(fixed_location = distance ~  age,
#'             random_location = ~ age | Subject,
#'             fixed_scale = sigma ~  1, k = 3,
#'             random_scale = ~ 1 | Subject,
#'             adapt = 5000,
#'             iter = 10000,
#'             rho_test = "all",
#'             mixture = "SSVS",
#'             data = dat)
#'
#'model_code(fit)
#'}
model_code <- function(object){

  cat(paste("# generated by hypMuVar\n\n", object$jags_model))

}
donaldRwilliams/hypMuVar documentation built on Jan. 10, 2020, 9:45 a.m.