assurance | R Documentation |
These generic functions provide the framework for assurance computations.
earlyStudy |
Data defining the initial study. |
laterStudy |
Information about the later study. |
nsim |
Number of Monte-Carlo simulations (maybe unnecessary). |
posteriorSample |
A sample from our posterior distribution. |
laterSample |
Simulations of the later trial. |
These generic functions tie together the whole assurance calculation. By
default they do Monte-Carlo simulation using samplePosterior
(which
samples from the posterior distribution), sampleLater
(which, given a
sample from the posterior, simulates the later study), and
sampleAndTestLater
. sampleAndTestLater
is just the
composition of samplePosterior
and testLater
.
sampleAndTestLater
exists for the purposes of shortcut calculations
in which, given a sample from the posterior, the probability of later stage
success can be directly determined.
assurance
returns a scalar; the calculated assurance.
samplePosterior
returns an opaque object that contains samples from
the posterior.
sampleLater
returns an opaque object that contains simulated results
for the later study.
testLater
returns probability of success for the simulated later
study.
sampleAndTestLater
returns probability of success for simulated later
study.
Paul Metcalfe
count.data <-
new.overdispersedPoisson(grp1.count=27,
grp1.overdispersion=1.6,
grp1.time.at.risk=97,
grp2.count=56,
grp2.overdispersion=1.6,
grp2.time.at.risk=82)
later.study <-
new.overdispersedPoissonStudy(duration=56./52,
grp1.size=228,
grp2.size=228,
grp1.overdispersion=1.6,
grp2.overdispersion=1.6,
significance=0.04)
assurance(count.data, later.study, nsim=100000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.