OutcomeDist: OutcomeDist object

Description Usage Arguments Details References See Also Examples

Description

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

Usage

1
OutcomeDist(outcome.dist, outcome.type = NULL)

Arguments

outcome.dist

defines the outcome distribution.

outcome.type

defines the outcome type.

Details

Objects of class OutcomeDist are used in objects of class DataModel to specify the outcome distribution of the generated data. A single object of class OutcomeDist can be added to an object of class DataModel.

Several distribution are already implemented in the Mediana package (listed below, along with the required parameters to specify in the outcome.par argument of the Sample object) to be used in the outcome.dist argument:

The outcome.type argument defines the outcome's type. This argument accepts only two values:

The outcome's type must be defined for each endpoint in case of multivariate disribution, e.g. c("event","event") in case of multivariate exponential distribution.

References

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

See Also

See Also DataModel.

Examples

 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Simple example with a univariate distribution
# 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
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))

# Complex example with multivariate distribution following a Binomial and a Normal distribution
# Variable types
var.type = list("BinomDist", "NormalDist")

# Outcome distribution parameters
plac.par = list(list(prop = 0.3), list(mean = -0.10, sd = 0.5))

dosel.par1 = list(list(prop = 0.40), list(mean = -0.20, sd = 0.5))
dosel.par2 = list(list(prop = 0.45), list(mean = -0.25, sd = 0.5))
dosel.par3 = list(list(prop = 0.50), list(mean = -0.30, sd = 0.5))

doseh.par1 = list(list(prop = 0.50), list(mean = -0.30, sd = 0.5))
doseh.par2 = list(list(prop = 0.55), list(mean = -0.35, sd = 0.5))
doseh.par3 = list(list(prop = 0.60), list(mean = -0.40, sd = 0.5))

# Correlation between two endpoints
corr.matrix = matrix(c(1.0, 0.5,
                       0.5, 1.0), 2, 2)

# Outcome parameter set 1
outcome1.plac = list(type = var.type, par = plac.par, corr = corr.matrix)
outcome1.dosel = list(type = var.type, par = dosel.par1, corr = corr.matrix)
outcome1.doseh = list(type = var.type, par = doseh.par1, corr = corr.matrix)

# Outcome parameter set 2
outcome2.plac = list(type = var.type, par = plac.par, corr = corr.matrix)
outcome2.dosel = list(type = var.type, par = dosel.par2, corr = corr.matrix)
outcome2.doseh = list(type = var.type, par = doseh.par2, corr = corr.matrix)

# Outcome parameter set 3
outcome3.plac = list(type = var.type, par = plac.par, corr = corr.matrix)
outcome3.doseh = list(type = var.type, par = doseh.par3, corr = corr.matrix)
outcome3.dosel = list(type = var.type, par = dosel.par3, corr = corr.matrix)

# Data model
data.model = DataModel() +
             OutcomeDist(outcome.dist = "MVMixedDist") +
             SampleSize(c(100, 120)) +
             Sample(id = list("Plac ACR20", "Plac HAQ-DI"),
                    outcome.par = parameters(outcome1.plac, outcome2.plac, outcome3.plac)) +
             Sample(id = list("DoseL ACR20", "DoseL HAQ-DI"),
                    outcome.par = parameters(outcome1.dosel, outcome2.dosel, outcome3.dosel)) +
             Sample(id = list("DoseH ACR20", "DoseH HAQ-DI"),
                    outcome.par = parameters(outcome1.doseh, outcome2.doseh, outcome3.doseh))

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