Skip to main content
Skip table of contents

setNbReplicates

Define the number of replicates of the simulation.

Usage

R
setNbReplicates(nb)

Arguments

nb

(integer) Number of replicates.

Details

The number of replicates is the number of times that Simulx will simulate a given study. It should not be mixed up with the group size defined by setGroupSize.

To simulate one study, Simulx samples a number of individuals for each group, defined by setGroupSize (let's say NidsPerGroup). To simulate replicate studies, it will sample for each replicate NidsPerGroup other individuals for each group (it is like changing the seed).

If the parameter element is an individual element or a population parameter defined with a vector, replicates will always sample individuals using the same population parameters. In this case, they are useful to check the effect of changing the seed, to get for example the uncertainty of an endpoint due to limited sampling.

If the parameter element is a population element defined with a table containing several lines, or an imported element such as mlx_PopUncertainSA or mlx_TypicalUncertainSA, each replicate will use a different population parameter to simulate the study. In this case, it is possible to see the effect of changing the population parameters on the prediction (in addition to uncertainty due to limited sampling).

All options of the Simulx scenario are the same as in Simulx GUI. Check the online doc of Simulx to get more guidance on how to use them.

See also

Examples

R
  initializeLixoftConnectors("simulx")
  project_name <- file.path(getDemoPath(), "5.simulation", "replicates.smlx")
  loadProject(project_name)
  setNbReplicates(nb = 20)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.