Simulation
To perform simulations, the following functionality has been implemented:
Incertus.SimulatedRandomization — TypeA type, representing an output of a simulated randomization procedure.
A command SimulatedRandomization(target, label, trt, prb) initializes an instance of SimulatedRandomization:
targetis a vector of target allocation ratio;labelis a string that describes the simulated randomization procedure;trtis a matrix of size $n\times K\times S$, representing treatment assignments;prbis 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.
Incertus.simulate — MethodFunction 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.
Incertus.simulate — FunctionFunction 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.
Incertus.simulate — FunctionFunction simulates a set of randomization procedures
Call:
simulate(rnd, nsbj, nsim, seed)
Arguments
rnd::Vector{<:Randomization}: a vector of instances of<:Randomizationtype; 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
SimulatedRandomizationtype; each instance represents a simulated randomization procedure.