Learn R Programming

OneArmPhaseTwoStudy (version 1.0.3)

get_conditionalPower: Calculates the conditional power.

Description

Calculates the conditional power of a given subset design.

Usage

get_conditionalPower(t, u, enrolled, r1, n1, r, s, n, pc1, pt1,
  sub1 = setupSub1Design())

Arguments

t

observed responses in the subset endpoint.

u

observed responses in the superset endpoint.

enrolled

number of patients enrolled so far.

r1

critical value for the first stage.

n1

sample size for the first stage.

r

critical value for the subset endpoint.

s

critical value for the superset endpoint.

n

overall sample size.

pc1

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

pt1

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

sub1

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

See Also

setupSub1Design

Examples

Run this code
# NOT RUN {
#Setup "sub1"-object
sub1 <- setupSub1Design(pc0 = 0.5, pt0 = 0.6)

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

t <- 5
u <- 7
enrolled <- 10

con_p <- get_conditionalPower(t, u, enrolled, design$r1,
design$n1, design$r, design$s, design$n, design$pc1, design$pt1, sub1)
# }

Run the code above in your browser using DataLab