simulate_multinomial_obs.Rd
Simulate observations from a multinomial distribution #' A wrapper function around `rmultinom` that generates a single vector of observations from a multinomial distribution where each of the `K` multinomial classes has probability `pred`. This function will automatically handle generating multinomial draws across multiple sexes. Aging error can be optionally applied.
simulate_multinomial_obs(
pred,
samp_size,
aggregate_sex = FALSE,
as_integers = FALSE,
age_err = NA
)
the probability associated with each class
multinomical sample size
whether to automaticaly apply ageing error
if (FALSE) {
simulate_multinomial_obs(c(0.25, 0.50, 0.25), 100)
}