Skip to content

Commit b56edb9

Browse files
committed
Fix manuals
1 parent f492063 commit b56edb9

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

R/estimate_mode.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' Function to estimate mode of MCMC samples
22
#'
33
#' Based on codes from 'http://stackoverflow.com/questions/2547402/is-there-a-built-in-function-for-finding-the-mode'
4-
#' see the comment by Rasmus Bååth
4+
#' see the comment by Rasmus Baath
55
#'
66
#' @param x MCMC samples or some numeric or array values.
77
#' @importFrom stats density

R/extract_ic.R

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
#' Extract Model Comparison Estimates
22
#'
33
#' @param modelData Object returned by \code{'hBayesDM'} model function
4+
#' @param ic Information Criterion. 'looic', 'waic', or 'both'
45
#' @param core Number of cores to use for leave-one-out estimation
56
#'
67
#' @importFrom loo extract_log_lik loo waic
78
#'
8-
#' @return IC Leave-One-Out and Watanabe-Akaike information criterion estimates.
9+
#' @return IC Leave-One-Out and/or Watanabe-Akaike information criterion estimates.
910
#'
1011
#' @export
11-
12+
#' @examples
13+
#' \dontrun{
14+
#' library(hBayesDM)
15+
#' output = bandit2arm_delta("example", niter=2000, nwarmup=1000, nchain=4, ncore = 1)
16+
#' # To show the LOOIC model fit estimates (a detailed report; c)
17+
#' extract_ic(output)
18+
#' # To show the WAIC model fit estimates
19+
#' extract_ic(output, ic="waic")
20+
#' }
21+
#'
1222
extract_ic <- function(modelData = NULL,
1323
ic = "looic",
1424
core = 2) {

man/extract_ic.Rd

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)