Description Usage Arguments Details References See Also Examples
This function creates an object of class SampleSize which can be
added to an object of class DataModel.
1 | SampleSize(sample.size)
|
sample.size |
a list or vector of sample size(s). |
Objects of class SampleSize are used in objects of class
DataModel to specify the sample size in case of balanced design (all
samples will have the same sample size). A single object of class
SampleSize can be added to an object of class DataModel.
Either objects of class Event or SampleSize can be added to an
object of class DataModel, but not both.
http://gpaux.github.io/Mediana/
See Also DataModel.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # 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))
# Equivalent to:
case.study1.data.model = DataModel() +
OutcomeDist(outcome.dist = "NormalDist") +
SampleSize(seq(50, 70, 5)) +
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.