generateNormalData {safestats} | R Documentation |
Generates Normally Distributed Data Depending on the Design
Description
The designs supported are "oneSample", "paired", "twoSample".
Usage
generateNormalData(
nPlan,
nSim = 1000L,
deltaTrue = NULL,
muGlobal = 0,
sigmaTrue = 1,
paired = FALSE,
seed = NULL,
muTrue = NULL
)
Arguments
nPlan |
vector of max length 2 representing the planned sample sizes. |
nSim |
the number of replications, that is, experiments with max samples nPlan. |
deltaTrue |
numeric, the value of the true standardised effect size (test-relevant parameter). |
muGlobal |
numeric, the true global mean of a paired or two-sample t-test. Its value should not matter for the test. This parameter is treated as a nuisance. |
sigmaTrue |
numeric > 0,the true standard deviation of the data. Its value should not matter for the test.This parameter treated is treated as a nuisance. |
paired |
logical, if |
seed |
To set the seed for the simulated data. |
muTrue |
numeric representing the true mean for simulations with a z-test.
Default |
Value
Returns a list of two data matrices contains at least the following components:
- dataGroup1
a matrix of data dimension nSim by
nPlan[1]
.- dataGroup2
a matrix of data dimension nSim by
nPlan[2]
.
Examples
generateNormalData(20, 15, deltaTrue=0.3)