assurance: Compute Assurance

assuranceR Documentation

Compute Assurance

Description

These generic functions provide the framework for assurance computations.

Arguments

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.

Details

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.

Value

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.

Author(s)

Paul Metcalfe

Examples


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)

scientific-computing-solutions/assurance documentation built on June 28, 2023, 12:31 p.m.