Commit a5c15624 authored by Chris Jewell's avatar Chris Jewell
Browse files

Updated HaldDP doc to reflect changes in 8ab72778.

parent 50ffc6c3
......@@ -97,7 +97,7 @@ human cases for each type, time and location follow a Poisson likelihood.
\tab i.e. \eqn{theta = sum(Human_itl) / sum(lambda_ijtl / theta)}}
}
\item{\code{fit_params(n_iter = 1000, burn_in = 0, thin = 1,
\item{\code{mcmc_params(n_iter = 1000, burn_in = 0, thin = 1,
n_r = ceiling(private$nTypes * 0.2), params_fix = NULL)}}{when called, sets the mcmc
parameters.
......@@ -117,7 +117,7 @@ human cases for each type, time and location follow a Poisson likelihood.
\item{\code{update(n_iter, append = TRUE)}}{when called, updates the \code{HaldDP}
model by running \code{n_iter} iterations.
If missing \code{n_iter}, the \code{n_iter} last set using \code{fit_params()}
If missing \code{n_iter}, the \code{n_iter} last set using \code{mcmc_params()}
or \code{update()} is used.
\code{append}
......@@ -143,7 +143,7 @@ human cases for each type, time and location follow a Poisson likelihood.
\code{theta} (an array \code{theta[types, iters]}), \code{s} (an array
\code{s[types, iters]}), and \code{r} (an array \code{r[types, sources, times]})).}
\item{\code{print_fit_params}}{returns a list of fitting parameters (\code{n_iter},
\item{\code{print_mcmc_params}}{returns a list of fitting parameters (\code{n_iter},
\code{append}, \code{burn_in}, \code{thin}, \code{params_fix} (R6 class with members
\code{alpha}, \code{q}, \code{r})).}
......@@ -233,14 +233,14 @@ prevs <- data.frame(Value = c(181/ 239, 113/196, 109/127,
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$fit_params(n_iter = 100, burn_in = 10, thin = 1)
res$mcmc_params(n_iter = 100, burn_in = 10, thin = 1)
res$update()
dat <- res$print_data()
init <- res$print_inits()
prior <- res$print_priors()
acceptance <- res$print_acceptance()
fit_params <- res$print_fit_params()
mcmc_params <- res$print_mcmc_params()
res$plot_heatmap(iters = 10:100, hclust_method = "complete")
......
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