R/hit_generator_from_multinomial.R

Defines functions hit_generator_from_multinomial

Documented in hit_generator_from_multinomial

#' @title Under Const
#'
#' @inheritParams hits_rate_creator
#' @details The algorithm of \code{rmultinom()} explained in \code{?rmultinom} is quite same as mine code.
#' So, I do not need to write this code. OK.
#'
#' @return A vector of non-negative integers
#' @export
#'
# @examples
hit_generator_from_multinomial  <- function(
  z.truth  = c(0.1,0.2,0.3,0.4,0.5),
  mu.truth = 1,
  v.truth  = 2
) {

  hit_rate <-  hits_rate_creator (
                          z.truth  = z.truth,
                          mu.truth = mu.truth,
                          v.truth  = v.truth,

                          is_hit_rate_adjusted = FALSE
                        )

  stats::rmultinom(10, size = 12, prob = z.truth)

}

Try the BayesianFROC package in your browser

Any scripts or data that you put into this service are public.

BayesianFROC documentation built on Jan. 13, 2021, 5:22 a.m.