check_simulator: Check if simulator with fixed quantiles is well implemented

View source: R/functions.R

check_simulatorR Documentation

Check if simulator with fixed quantiles is well implemented

Description

Run simulations to catch random variations. Warning : does not check it formally. Warning : does not check if quantiles are used several times.

Usage

check_simulator(
  simulatorQ,
  ndraw,
  Theta_lower = 0,
  Theta_upper = 1,
  ntheta = 5,
  nruns = 3
)

Arguments

simulatorQ

Function of type simulatorQ(Theta, quantiles) where Theta is the parameter set for the simulations and quantiles are drawn in U(0,1).

ndraw

Integer. Number of random variables to draw for one simulation of the model.

Theta_lower

1D numeric array. Lower bounds of Theta parameters.

Theta_upper

1D numeric array. Upper bounds of Theta parameters.

ntheta

Integer. Number of Theta parameters to test.

nruns

Integer. For each Theta, number of simulations to run.

Value

Boolean. True if no random effect was detected, False else.

Examples

simulatorQ <- function(Theta, quantiles){
qpois(quantiles, lambda = Theta)
}
check_simulator(simulatorQ, 5,
Theta_lower = 50, Theta_upper = 150)


flimo documentation built on May 31, 2023, 6:04 p.m.