prob.SM {CLAST} | R Documentation |
Probability of sufficient statistics (S,M).
Description
Calculates probability distribution of sufficient statistics (S,M) from sample space object.
Usage
prob.SM(data, p, m = NULL, s = NULL)
Arguments
data |
list with components $Y, $S, $M, $design, $count. Thsi will typically be the output of sample.space or sample.space.2. |
p |
value of binary probability |
m |
number of stages at end of sequential trial |
s |
number of successes at end of sequential trial |
Value
list with component $prob, $count, $subcount and matrix $data giving the $subcount different binary sequential outcomes that lead to $prob.
Author(s)
Chris J. Lloyd
References
Lloyd, C.J. (2020) Exact confidence limits after a group sequential single arm binary trial. Statistics in Medicine, Volume 38, 2389-2399. doi: 10.1002/sim.8909
Examples
n=c(5,6,5,9)
a=c(2,4,5,12)
b=c(5,9,11,13)
# There are 364 possible outcomes from this design which are
# listed in a natural systematic order by function sample.space.
all.samples=sample.space(n,a,b)
attributes(all.samples)
# Y contains the 364 possible sequential binary outcomes;
# M contains how many stages before the decision;
# S contains the total number of success that produces the decision;
# decision the final binary test result of H0 or H1.
prob.SM(all.samples,p=.5,m=3,s=11)
[Package CLAST version 1.0.1 Index]