assess {acebayes}R Documentation

Compares two designs under the approximate expected utility

Description

Calculates approximations to the expected utility for two designs.

Usage


assess(d1, d2, ...)

## S3 method for class 'ace'
assess(d1, d2, B = NULL, n.assess = 20, relative = TRUE, ...)

## S3 method for class 'pace'
assess(d1, d2, B = NULL, n.assess = 20, relative = TRUE, ...)

Arguments

d1, d2

d1 should be an object of class "ace" or "pace" and d2 should be an object of class "ace", "pace" or "matrix".

B

An optional argument for controlling the approximation to the expected utility (see ace, aceglm and acenlm). If left unspecified, the value is inherited from the argument d1.

n.assess

If d1 was generated from a call to (p)ace with argument deterministic = FALSE or from a call to (p)aceglm or (p)acenlm with argument method being "MC", then n.assess is an optional argument giving the number of evaluations of the stochastic approximation to the expected utility.

relative

An optional argument, for when d1 was generated as a call to (p)aceglm or (p)acenlm with argument criterion being "A", "D" or "E", controlling whether the measure of relative efficiency is calculated for d1 relative to d2 (TRUE; the default) or for d2 relative to d1 (FALSE).

...

Arguments to be passed to and from other methods.

Details

In the case of when d1 was generated from a call to (p)ace with argument deterministic = FALSE or from a call to (p)aceglm or (p)acenlm with argument method being "MC", n.assess evaluations of the stochastic approximation to the expected utility will be calculated for each of the designs from d1 and d2. Otherwise, one evaluation of the deterministic approximation to the expected utility will be calculated for each of the designs from d1 and d2.

In the case when d1 was generated as a call to (p)aceglm or (p)acenlm with argument criterion being "A", "D" or "E", the relative D-, E-, or A-efficiency of the two designs will be calculated. The direction of the relative efficiency can be controlled by the relative argument.

Value

The function will an object of class "assess" which is a list with the following components:

U1

In the case of when d1 was generated from a call to (p)ace with argument deterministic = FALSE or from a call to (p)aceglm or (p)acenlm with argument method being "MC", U1 will be a vector of n.assess evaluations of the stochastic approximation to the expected utility for design d1. Otherwise, U1 will be a scalar of one evaluation of the deterministic approximation to the expected utility for design d1.

U2

In the case of when d1 was generated from a call to (p)ace with argument deterministic = FALSE or from a call to (p)aceglm or (p)acenlm with argument method being "MC", U2 will be a vector of n.assess evaluations of the stochastic approximation to the expected utility for design d2. Otherwise, U2 will be a scalar of one evaluation of the deterministic approximation to the expected utility for design d2.

eff

In the case when d1 was generated as a call to (p)aceglm or (p)acenlm with argument criterion being "A", "D" or "E", eff is a scalar of the relative D-, E-, or A-efficiency of the two designs. Otherwise it will be NULL.

d1

The argument d1.

d2

The argument d2.

Author(s)

Antony M. Overstall A.M.Overstall@soton.ac.uk, David C. Woods, Maria Adamou & Damianos Michaelides

See Also

ace, pace, aceglm, acenlm, paceglm, pacenlm.

Examples

## This example involves finding a Bayesian D-optimal design for a 
## compartmental model with n = 18 runs. There are three parameters. 
## Two parameters have uniform priors and the third has a prior 
## point mass. 

n <- 18
k <- 1
p <- 3
set.seed(1)
start.d <- randomLHS(n = n, k = k) * 24
colnames(start.d) <- c("t")

a1<-c(0.01884, 0.298)
a2<-c(0.09884, 8.298)

prior <- list(support = cbind(rbind(a1, a2), c(21.8, 21.8)))
colnames(prior[[1]]) <- c("theta1", "theta2", "theta3") 

example <- acenlm(formula = ~ theta3 * (exp( - theta1 * t) - exp( - theta2 * t)), 
start.d = start.d, prior = prior, lower = 0, upper = 24, N1 = 2, N2 = 0)

## Compute efficiency of final design compared to starting design.
assess(d1 = example, d2 = start.d)

## Should get 

# Approximate expected utility of d1 = 15.40583 
# Approximate expected utility of d2 = 11.26968 
# Approximate relative D-efficiency = 396.9804% 


[Package acebayes version 1.10 Index]