Simulate Bayesian Sequential Treatment Comparisons Using a Gaussian Model

`gbayesSeqSim(est, asserts)`

a data frame with number of rows equal to that of `est`

with a number of new columns equal to the number of assertions added. The new columns are named `p1`

, `p2`

, `p3`

, ... (posterior probabilities), `mean1`

, `mean2`

, ... (posterior means), and `sd1`

, `sd2`

, ... (posterior standard deviations). The returned data frame also has an attribute `asserts`

added which is the original `asserts`

augmented with any derived `mu`

and `sigma`

and converted to a data frame, and another attribute `alabels`

which is a named vector used to map `p1`

, `p2`

, ... to the user-provided labels in `asserts`

.

- est
data frame created by

`estSeqSim()`

- asserts
list of lists. The first element of each list is the user-specified name for each assertion/prior combination, e.g.,

`"efficacy"`

. The other elements are, in order, a character string equal to "<", ">", or "in", a parameter value`cutoff`

(for "<" and ">") or a 2-vector specifying an interval for "in", and either a prior distribution mean and standard deviation named`mu`

and`sigma`

respectively, or a parameter value (`"cutprior"`

) and tail area`"tailprob"`

. If the latter is used,`mu`

is assumed to be zero and`sigma`

is solved for such that P(parameter > 'cutprior') = P(parameter < - 'cutprior') =`tailprob`

.

Frank Harrell

Simulate a sequential trial under a Gaussian model for parameter estimates, and Gaussian priors using simulated estimates and variances returned by `estSeqSim`

. For each row of the data frame `est`

and for each prior/assertion combination, computes the posterior probability of the assertion.

`gbayes()`

, `estSeqSim()`

, `simMarkovOrd()`

, `estSeqMarkovOrd()`