get_p_exact_subset: Calculates the exact p value.

Description Usage Arguments See Also Examples

View source: R/zzz.R

Description

Calculates the exact p value for a given subset design.

Usage

1
get_p_exact_subset(t, u, r1, n1, n, pc0, pt0, sub1 = setupSub1Design())

Arguments

t

observed responses in the subset endpoint.

u

observed responses in the superset endpoint.

r1

critical value for the first stage.

n1

sample size for the first stage.

n

overall sample size.

pc0

the response probability for the subset endpoint under the null hypothesis.

pt0

the response probability for the superset endpoint under the null hypothesis.

sub1

"sub1"-object used to calculate the p value in c++ .

See Also

setupSub1Design

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Setup "sub1"-object
sub1 <- setupSub1Design(pc0 = 0.5, pt0 = 0.6)

#Calculate a  subset design
design <- getSolutionsSub1(sub1, skipN1 = FALSE)$Solutions[4,]

#Assuming 9 responses in the subset endpoint and 13 responses
#in the superset endpoint were observed.
t = 9
u = 13

p_val <- get_p_exact_subset(t, u, design$r1, design$n1, design$n, design$pc0, design$pt0, sub1)
p_val

OneArmPhaseTwoStudy documentation built on May 2, 2019, 9:28 a.m.