Commit 434137f7 by Poppy Miller

 ... ... @@ -216,8 +216,8 @@ divided by the number of negative samples) \eqn{j} \deqn{r_{ijt}} is the unknown relative occurrence of type \eqn{i} on source \eqn{j}. \emph{Priors} \deqn{r_{.jt}\sim Dirichlet(a_r_{1jt},..., a_r_{njt})} \deqn{a_{tl}\sim Dirichlet(a_alpha_{1tl},..., a_alpha_{mtl})} \deqn{r_{.jt}\sim Dirichlet(a\_r_{1jt},..., a\_r_{njt})} \deqn{a_{tl}\sim Dirichlet(a\_alpha_{1tl},..., a\_alpha_{mtl})} \deqn{q\sim DP(a_q, Gamma(a_{theta},b_{theta}))} } } ... ... @@ -235,19 +235,19 @@ res <- HaldDP$new(data = campy, k = prevs, priors = priors, a_q = 1) res$fit_params(n_iter = 100, burn_in = 10, thin = 1) res$update() res$print_data() res$print_inits() res$print_priors() res$print_acceptance() res$print_fit_params() dat <- res$print_data() init <- res$print_inits() prior <- res$print_priors() acceptance <- res$print_acceptance() fit_params <- res$print_fit_params() res$plot_heatmap(iters = 10:100, hclust_method = "complete") res$summary(params = c("alpha", "q", "lambda_i"), summarys <- res$summary(params = c("alpha", "q", "lambda_i"), times = "1", sources = c("ChickenA", "Bovine"), iters = 10:100, flatten = TRUE, CI_type = "chen-shao") res$extract(params = c("alpha", "r", "q", "lambda_j"), posteriors <- res$extract(params = c("alpha", "r", "q", "lambda_j"), sources = c("ChickenB", "Ovine"), types = c("474", "52"), iters = 50:100, drop = FALSE, flatten = FALSE) ... ... @@ -256,9 +256,11 @@ res\$extract(params = c("alpha", "r", "q", "lambda_j"), Chris Jewell and Poppy Miller \email{p.miller at lancaster.ac.uk} } \references{ Chen, M.-H. and Shao, Q.-M. (1998). Monte Carlo estimation of Bayesian credible and HPD intervals, \emph{Journal of Computational and Graphical Statistics}, 7. Chen, M.-H. and Shao, Q.-M. (1998). Monte Carlo estimation of Bayesian credible and HPD intervals, \emph{Journal of Computational and Graphical Statistics}, 7. Liu Y, Gelman A, Zheng T (2015). "Simulation-efficient shortest probability intervals." Statistics and Computing. Liu Y, Gelman A, Zheng T (2015). "Simulation-efficient shortest probability intervals." Statistics and Computing. } \keyword{datasets}