Sample object
This function creates an object of class Sample
which can be added to an object of class DataModel
.
Sample(id, outcome.par, sample.size = NULL)
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
.
See Also DataModel
and OutcomeDist
.
# 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))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.