TwoSampleBinary: Functions to Support the Two Sample Binary Scenario

Description Usage Arguments Examples

Description

make.ts.bin.ppp: Make Two Sample Binary Prior/Posterior Plot. Returns a ggplot object.

make.ts.bin.spp: Make Two Sample Binary Shaded Posterior Plot. Returns a graphic built using grid.arrange.

get.ts.bin.trt.oc.df: Get Two Sample Binary Treatment Effect OC. Returns a data.frame.

make.ts.bin.trt.oc1: Make Two Sample Binary Treatment Effect. Returns a graphic built using grid.arrange.

make.ts.bin.trt.oc2: Make Two Sample Binary Treatment Effect. Returns a graphic built using grid.arrange.

get.ts.bin.ssize.oc.df: Get Two Sample Binary sample size OC data.frame. Returns a data.frame.

make.ts.bin.ssize.oc: Make Two Sample Binary Sample size OC plot

Usage

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
make.ts.bin.ppp(
  a.con = 1,
  b.con = 1,
  n.con = 40,
  x.con = 5,
  a.trt = 1,
  b.trt = 1,
  n.trt = 40,
  x.trt = 20
)

get.ts.bin.decision(
  a.con = 1,
  b.con = 1,
  n.con = 40,
  x.con = 5,
  a.trt = 1,
  b.trt = 1,
  n.trt = 40,
  x.trt = 20,
  Delta.tv = 0.25,
  Delta.lrv = 0.2,
  tau.tv = 0.1,
  tau.lrv = 0.8,
  tau.ng = 0.65
)

get.ts.bin.decision.df(
  a.con = 1,
  b.con = 1,
  n.con = 40,
  x.con = 0:40,
  a.trt = 1,
  b.trt = 1,
  n.trt = 40,
  x.trt = 0:40,
  Delta.tv = 0.25,
  Delta.lrv = 0.2,
  tau.tv = 0.1,
  tau.lrv = 0.8,
  tau.ng = 0.65
)

make.ts.bin.spp(
  a.con = 4,
  b.con = 36,
  n.con = 40,
  x.con = 4,
  a.trt = 1,
  b.trt = 1,
  n.trt = 40,
  x.trt = 14,
  Delta.lrv = 0.3,
  Delta.tv = 0.4,
  tau.tv = 0.1,
  tau.lrv = 0.8,
  tau.ng = 0.8,
  nlines.ria = 20,
  tsize = 4,
  nlines = 25
)

get.ts.bin.trt.oc.df(
  a.con = 1,
  b.con = 1,
  dcurve.con = 0.12,
  a.trt = 1,
  b.trt = 1,
  TE.OC.N = 80,
  Aratio = 1,
  TE.OC.Delta.LB = 0,
  TE.OC.Delta.UB = 1 - 0.12,
  Delta.tv = 0.35,
  Delta.lrv = 0.2,
  tau.tv = 0.01,
  tau.lrv = 0.8,
  tau.ng = 0.65
)

make.ts.bin.trt.oc1(my.df = get.ts.bin.trt.oc.df(), nlines = 25, tsize = 4)

make.ts.bin.trt.oc2(my.df = get.ts.bin.trt.oc.df(), tsize = 4, nlines = 25)

get.ts.bin.ssize.oc.df(
  a.con = 1,
  b.con = 1,
  a.trt = 1,
  b.trt = 1,
  dcurve.con = 0.12,
  TE.OC.N = 80,
  Aratio = 2,
  SS.OC.N.LB = 40,
  SS.OC.N.UB = 160,
  Delta.lrv = 0.2,
  Delta.tv = 0.25,
  SS.OC.Delta = 0.25,
  tau.tv = 0.1,
  tau.lrv = 0.8,
  tau.ng = 0.65,
  Delta.user = 0.3,
  nlines = 15,
  tsize = 4,
  npoints = 3
)

make.ts.bin.ssize.oc(
  for.plot = get.ts.bin.ssize.oc.df(),
  tsize = 4,
  nlines = 25,
  npoints = 5
)

Arguments

a.con

prior alpha parameter for control group

b.con

prior beta parameter for control group

n.con

sample size for control group

x.con

number of responders for control group

a.trt

prior alpha parameter for treatment group

b.trt

prior beta parameter for treatment group

n.trt

sample size for control treatment group

x.trt

number of responders for treatment group

Delta.tv

TPP Target Value aka Base TPP

Delta.lrv

TPP Lower Reference Value aka Min TPP

tau.tv

threshold associated with Base TPP

tau.lrv

threshold associated with Min TPP

tau.ng

threshold associated with No-Go

nlines.ria

Control for text spacing

tsize

Control for text size

nlines

Control for text spacing

dcurve.con

response rate assumed for control group

TE.OC.N

total sample size for treatment effect OC

Aratio

Allocation ratio

SS.OC.N.LB

sample size lower bound

SS.OC.N.UB

sample size upper bound

SS.OC.Delta

user's TPP

npoints

number of points for sample size OC curve

seed

random seed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

lylyf1987/GNGpkg documentation built on May 19, 2020, 12:07 a.m.