Sample: Sample object

Description Usage Arguments Details References See Also Examples

Description

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

Usage

1
Sample(id, outcome.par, sample.size = NULL)

Arguments

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

Details

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.

References

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

See Also

See Also DataModel and OutcomeDist.

Examples

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

Example output

OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
Warning message:
system call failed: Cannot allocate memory 

Mediana documentation built on May 8, 2019, 5:04 p.m.