Description Usage Arguments Details References See Also Examples
This function creates an object of class Sample
which can be added to
an object of class DataModel
.
1 |
id |
defines the ID of the sample. |
outcome.par |
defines the parameters of the outcome distribution of the sample. |
sample.size |
defines the sample size of the sample (optional). |
Objects of class Sample
are used in objects of class DataModel
to specify a sample. Several objects of class Sample
can be added to
an object of class DataModel
.
Mandatory arguments are id
and outcome.par
. The
sample.size
argument is optional but must be used to define the
sample size if unbalance samples have to be defined. The sample size must be
either defined in the Sample
object or in the SampleSize
object, but not in both.
outcome.par
defines the sample-specific parameters of the
OutcomeDist
object. Required parameters according to the distribution
can be found in OutcomeDist
.
http://gpaux.github.io/Mediana/
See Also DataModel
and OutcomeDist
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Outcome parameter set 1
outcome1.placebo = parameters(mean = 0, sd = 70)
outcome1.treatment = parameters(mean = 40, sd = 70)
# Outcome parameter set 2
outcome2.placebo = parameters(mean = 0, sd = 70)
outcome2.treatment = parameters(mean = 50, sd = 70)
# Data model
case.study1.data.model = DataModel() +
OutcomeDist(outcome.dist = "NormalDist") +
SampleSize(c(50, 55, 60, 65, 70)) +
Sample(id = "Placebo",
outcome.par = parameters(outcome1.placebo, outcome2.placebo)) +
Sample(id = "Treatment",
outcome.par = parameters(outcome1.treatment, outcome2.treatment))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.