SampleSize {Mediana}R Documentation

SampleSize object

Description

This function creates an object of class SampleSize which can be added to an object of class DataModel.

Usage

SampleSize(sample.size)

Arguments

sample.size

a list or vector of sample size(s).

Details

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.

References

http://gpaux.github.io/Mediana/

See Also

See Also DataModel.

Examples

# 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))

[Package Mediana version 1.0.8 Index]