Simulation

To perform simulations, the following functionality has been implemented:

Incertus.SimulatedRandomizationType

A type, representing an output of a simulated randomization procedure.

A command SimulatedRandomization(target, label, trt, prb) initializes an instance of SimulatedRandomization:

  • target is a vector of target allocation ratio;
  • label is a string that describes the simulated randomization procedure;
  • trt is a matrix of size $n\times K\times S$, representing treatment assignments;
  • prb is an array of size $n\times K\times S$, representing allocation probabilities,

where

  • $n$ is the number of subjects simulated;
  • $K$ is the number of treatments simulated (equal to the length of the target allocation vector);
  • $S$ is the number of simulations performed.
source
Incertus.simulateMethod

Function simulates a randomization procedure

Call:

simulate(rnd, nsbj, nsim, seed)

Arguments

  • rnd::T where T <: Randomization: an object, representing a randomization procedure to be simulated.
  • nsbj::Int64: number of subjects simulated.
  • nsim::Int64: number of simulations performed.
  • seed::Int64: a random seed (for reproducibility); a default is set to 314159.

Result

  • an object, representing simlated randomization, an instance of SimulatedRandomization.
source
Incertus.simulateFunction

Function simulates a randomization procedure

Call:

simulate(rnd, nsbj, nsim, seed)

Arguments

  • rnd::DLUD : an object, representing a DLUD randomization procedure to be simulated.
  • nsbj::Int64: number of subjects simulated.
  • nsim::Int64: number of simulations performed.
  • seed::Int64: a random seed (for reproducibility); a default is set to 314159.

Result

  • an object, representing simlated randomization, an instance of SimulatedRandomization.
source
Incertus.simulateFunction

Function simulates a set of randomization procedures

Call:

simulate(rnd, nsbj, nsim, seed)

Arguments

  • rnd::Vector{<:Randomization}: a vector of instances of <:Randomization type; each instance represents a randomization procedure to be simulated.
  • nsbj::Int64: number of subjects simulated.
  • nsim::Int64: number of simulations performed.
  • seed::Int64: a random seed (for reproducibility); a default is set to 314159.

Result

  • a vector of instances of SimulatedRandomization type; each instance represents a simulated randomization procedure.
source