This function simulates a birp_data object using all parameter estimates, dimensionality (methods, locations, timepoints) and the total number of counts nu_ij of a birp object
simulate_birp_from_results(
x,
negativeBinomial = FALSE,
stochastic = FALSE,
mu = NULL,
b = NULL,
logSigma = NULL,
logPhi = NULL,
verbose = TRUE
)An object of type birp_data
An object of type birp.
Logical; if TRUE, simulate counts using a negative binomial distribution instead of Poisson.
Logical; if TRUE, use a stochastic model with log-normal fluctuations.
A numeric vector specifying values of \(\mu\) for the negative binomial model, with one value per method-location combination. If NULL, \(\mu_i\) for method \(i\) is set to \(1 / \text{number of locations}\).
A numeric vector specifying values of \(b\) for the negative binomial model (one per method). If NULL, all \(b_i\) are set to 1.
A single numeric value specifying logSigma for the stochastic model. If NULL, logSigma is set to -1.
A numeric vector specifying values of logPhi for the stochastic model. If NULL, values are simulated according to the model assumptions.
Logical; if FALSE, suppresses console output.
data <- simulate_birp()
x <- birp(data)
data2 <- simulate_birp_from_results(x)
Run the code above in your browser using DataLab