Commit 7f671103 authored by Chris Jewell's avatar Chris Jewell
Browse files

Wrote wrapper function for HaldDP to avoid having to specify HaldDP$new. Now just do:

> model = HaldDP(...)
parent f584d9c7
......@@ -248,7 +248,7 @@
#' Time = rep(1, 6),
#' Location = rep("A", 6))
#' priors <- list(a_alpha = 1, a_r = 0.1, a_theta = 0.01, b_theta = 0.00001)
#' res <- HaldDP$new(data = campy, k = prevs, priors = priors, a_q = 0.1)
#' res <- HaldDP(data = campy, k = prevs, priors = priors, a_q = 0.1)
#' res$mcmc_params(n_iter = 100, burn_in = 10, thin = 1)
#' res$update()
#'
......@@ -268,8 +268,10 @@
#' sources = c("ChickenB", "Ovine"),
#' types = c("474", "52"),
#' iters = 50:100, drop = FALSE, flatten = FALSE)
HaldDP = function(y, x, k, priors, a_q, inits = NULL)
HaldDP_$new(y, x, k, priors, a_q, inits)
HaldDP <- R6::R6Class(
HaldDP_ <- R6::R6Class(
"HaldDP",
private = list(
## DATA
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment