Learn R Programming

adoptr (version 0.2.2)

DataDistribution-class: Data distributions

Description

DataDistribution is an abstract class used to represent the distribution of a sufficient statistic x given a sample size n and a single parameter value theta.

Arguments

x

outcome

n

sample size

theta

distribution parameter

...

further optional arguments

Slots

two_armed

Logical that indicates if a two-arm design is assumed.

Details

This abstraction layer allows the representation of t-distributions (unknown variance), normal distribution (known variance), and normal approximation of a binary endpoint. Currently, only the normal case is implemented with Normal-class.

The logical option two_armed allows to decide whether a one-arm or a two-arm (the default) design should be computed. In the case of a two-arm design all sample sizes are per group.

Examples

Run this code
# NOT RUN {
datadist <- Normal(two_armed = FALSE)

# }

Run the code above in your browser using DataLab