Learn R Programming

birp (version 0.0.5)

simulate_birp_from_results: 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

Description

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

Usage

simulate_birp_from_results(
  x,
  negativeBinomial = FALSE,
  stochastic = FALSE,
  mu = NULL,
  b = NULL,
  logSigma = NULL,
  logPhi = NULL,
  verbose = TRUE
)

Value

An object of type birp_data

Arguments

x

An object of type birp.

negativeBinomial

Logical; if TRUE, simulate counts using a negative binomial distribution instead of Poisson.

stochastic

Logical; if TRUE, use a stochastic model with log-normal fluctuations.

mu

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}\).

b

A numeric vector specifying values of \(b\) for the negative binomial model (one per method). If NULL, all \(b_i\) are set to 1.

logSigma

A single numeric value specifying logSigma for the stochastic model. If NULL, logSigma is set to -1.

logPhi

A numeric vector specifying values of logPhi for the stochastic model. If NULL, values are simulated according to the model assumptions.

verbose

Logical; if FALSE, suppresses console output.

Examples

Run this code
data  <- simulate_birp()
x <- birp(data)
data2 <- simulate_birp_from_results(x)

Run the code above in your browser using DataLab