ph2tnb: Truncated negative binomial distribution mass function

Description Usage Arguments Examples

View source: R/two-stage-design.R

Description

Returns the probability density function for the number of events to reach r= r1 successes in Stage 1 with p = p1 probability of success. Can also be the number of events to reach r failures with p <- (1-p1) probability of failure.

Usage

1
ph2tnb(p, n, r)

Arguments

p

vector containing the probability of successful outcomes in Stage 1 (p1) and Stage 2 (p2) or a scalar containing p1

n

vector containing sample sizes planned for Stage 1 (n1) and Stage 2 (n2) or a scalar containing n1

r

vector containing the minimum number of Stage 1 successes to continue to Stage 2 (r1) and the minimum number of Stage 2 successes to reject the null hypothesis (r2) or a scalar containing r1

Examples

1
2
# ph2tnb(p=0.8, n=6, r=4) 
# ph2tnb(p=0.2, n=6, r=3) 

kaneplusplus/curtail documentation built on May 24, 2019, 2:04 a.m.