Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
audreyyeoCH committed Dec 22, 2023
1 parent 44a3739 commit 6582731
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/ocPostprob.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@
# Prior of treatment arm parE= Beta(1,1).
res <- ocPostprob(
nnE = c(10, 20, 30), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50000, wiggle = TRUE, randomdist = NULL, nnF = c(10, 20, 30)
sim = 50000, wiggle = TRUE, randomdist = TRUE, nnF = c(10, 20, 30)
)

res$oc

# We specify the distance in this example.
res <- ocPostprob(
nnE = c(10, 20, 30), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50000, wiggle = TRUE, randomdist = c(-1, 3), nnF = c(10, 20, 30)
sim = 50000, wiggle = TRUE, randomdist = TRUE, nnF = c(10, 20, 30)
)

res$oc

# Here, nnE = nnF, and no wiggle room is allowed. Random distance also not supplied.
res <- ocPostprob(
nnE = c(10, 20, 30), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50000, wiggle = FALSE, randomdist = NULL, nnF = c(10, 20, 30)
sim = 50000, wiggle = FALSE, randomdist = TRUE, nnF = c(10, 20, 30)
)

res$oc

# Here, we only have one Futility and Efficacy look or stop.
res <- ocPostprob(
nnE = c(10), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50000, wiggle = FALSE, randomdist = NULL, nnF = 10
sim = 50000, wiggle = FALSE, randomdist = TRUE, nnF = 10
)

res$oc

# Here, we only have one Futility but many Efficacy looks or stop.
res <- ocPostprob(
nnE = c(10, 20, 30), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50000, wiggle = FALSE, randomdist = NULL, nnF = 10
sim = 50000, wiggle = FALSE, randomdist = TRUE, nnF = 10
)

res$oc

0 comments on commit 6582731

Please sign in to comment.