Description Usage Arguments Details Value Examples
Given the probabilities of outcomes, compute the power of the overall multinomial Cochran-Armitage trend test or determine the sample size to obtain a target power.
1 2 3 |
N |
integer, the total sample size of the study. If |
power |
target power. If |
pmatrix |
numeric matrix of hypothesized outcome probabilities in each group, with #' the outcomes as rows and ordered groups as columns. The columns should add up to 1. |
p.ave |
numeric vector of average probability of each outcome over the groups
weighted by |
p.start, p.end |
numeric vectors of the probability of each outcome for the first / last ordered group |
slopes |
numeric vector of the hypothesized slope of each outcome when regressed
against the column |
scores |
non-decreasing numeric vector of the same length as the number of ordered groups giving the trend test scores. Defaults to linearly increasing values. |
n.prop |
numeric vector describing relative sample sizes of the ordered groups. Will be normalized to sum to 1. Defaults to equal sample sizes. |
G |
integer, number of ordered groups |
sig.level |
significance level |
The distribution of the outcomes can be specified in two ways: either the full matrix of
outcome probabilities pmatrix
can be specified, or exactly two of the parameters
p.ave
, slopes
, p.start
, and p.end
must be specified, while
object of class "power.htest"
1 2 3 4 5 6 7 | power.multiCA.test(power=0.8, p.start=c(0.1,0.2,0.3,0.4), p.end=c(0.4, 0.3, 0.2, 0.1),
G=5, n.prop=c(3,2,1,2,3))
## Power of stroke study with 100 subjects per year and observed trends
data(stroke)
strk.mat <- xtabs(Freq ~ Type + Year, data=stroke)
power.multiCA.test(N=900, pmatrix=prop.table(strk.mat, margin=2))
|
Multinomial Cochran-Armitage trend test
n = 85.663
n.prop = 0.27272727, 0.18181818, 0.09090909, 0.18181818, 0.27272727
p.ave = 0.25, 0.25, 0.25, 0.25
slopes = 0.075, 0.025, -0.025, -0.075
G = 5
sig.level = 0.05
power = 0.8
Multinomial Cochran-Armitage trend test
n = 900
n.prop = 0.1111111, 0.1111111, 0.1111111, 0.1111111, 0.1111111, 0.1111111, 0.1111111, 0.1111111, 0.1111111
p.ave = 0.29123780, 0.17669534, 0.30588688, 0.03757237, 0.18860761
slopes = 0.004854911, 0.003100285, -0.017742374, 0.005732797, 0.004054381
G = 9
sig.level = 0.05
power = 0.8291081
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.