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.
methods
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
# 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 sizessample_size(trials)# the powerspower(trials)# the effect sizeseffect_size(trials)# the arm proportionsproportion(trials)# the significancesignificance(trials)# the variance estimatessigma2(trials)