pt-accessors: Preference trial parameter accessors

Description Usage Arguments Examples

Description

Accessor function have been created to get the sample size (sample_size), power (power), effect size (effect_size), arm proportion (proportion), significance (significance), and trial variance estimates (sigma2) for a set of preference trials.

Note that these methods are preferred over accessing the underlying data frame directly since the structure is slightly non-standard (some columns are lists) and some values, like power, are not stored directly.

Usage

 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
sample_size(x)

## S3 method for class 'preference.trial'
sample_size(x)

power(x)

## S3 method for class 'preference.trial'
power(x)

effect_size(x)

## S3 method for class 'preference.trial'
effect_size(x)

proportion(x)

## S3 method for class 'preference.trial'
proportion(x)

significance(x)

## S3 method for class 'preference.trial'
significance(x)

sigma2(x)

## S3 method for class 'preference.trial'
sigma2(x)

Arguments

x

the set of preference trials.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Create a set of trials with a sequence of preference effects.
trials <- preference.trial(pref_ss=100, pref_effect=seq(0.1, 2, by=0.5), 
                           selection_ss=100, selection_effect=1, 
                           treatment_ss=100, treatment_effect=1, sigma2=1, 
                           pref_prop=0.6)

# the sample sizes
sample_size(trials)

# the powers
power(trials)

# the effect sizes
effect_size(trials)

# the arm proportions
proportion(trials)

# the significance
significance(trials)

# the variance estimates
sigma2(trials)

preference documentation built on Sept. 13, 2020, 5:08 p.m.