Learn R Programming

designGLMM (version 0.1.0)

findOptimalBlockDesign: Find an efficient block design for a Poisson GLMM

Description

findOptimalBlockDesign finds a D-optimal or A-optimal block design for a Poisson generalised linear mixed model with gamma distributed random effects (Poisson-Gamma mixture) using simulated annealing.

Usage

findOptimalBlockDesign(numblock,blksize,means,sigma,sigmaB,probs=c(1), criterion="D",link="Poisson",trace=FALSE,iter=10000, temp=10,tmax=10,silent=FALSE,tol=0.0001,maxtime=60, startdes="random")

Arguments

numblock
an integer specifying the number of blocks in the block design to be constructed.
blksize
an integer specifying the number of experimental units that are in each block. For this function, the block size is constant across all blocks.
means
a vector specifying the means for each treatment group.
sigma
a numeric indicating the within block standard deviation in excess of the Poisson residual error
sigmaB
a numeric indicating the between block standard deviation.
probs
a list of probabilities specifying the probability that each step of the simulated annealing substitutes a certain number of design points. The first entry corresponds to the probability that only one substitution is made in a simulated annealing step, the second is the probability that two substitutions are made and so on. By default this is set to c(1) which means that only one substitution is made in each simulated annealing step.
criterion
Optimality criterion. For D-optimality use "D" and for A-optimality use "A".
link
The link function used. Currently only "Poisson" is supported.
trace
a logical indicating whether the function should return information about the iterations of the simulated annealing algorithm.
iter
the number of simulated annealing iterations per round. This variable is passed to the optim function.
temp
starting temperature for simulated annealing algorithm. This variable is passed to the optim function.
tmax
the number of function evaluations at each temperature in the simulated annealing algorithm. This variable is passed to the optim function.
silent
a logical indicating whether any output should be returned.
tol
a numeric value indicating the numerical tolerance required to stop the simulated annealing algorithm from restarting
maxtime
a numeric value indicating the maximum amount of time the fiunction is allowed to take before stopping optimisation
startdes
either "random" or "approximate". If random is chosen then a random starting design will be used. If "approximate" is used then the approximate proportions of each treatment in the optimal completely randomised design will appear in each block. If the block size is less than or close to the number of treatments, then "approximate" is not recommended.

Value

design
a matrix containing the optimal design. Each row corresponds to a single block.
value
the value of the D or A optimality criterion value for the optimal design, depending on whether "D" or "A" was specified under the criterion option.
iter
lists the evolution of the criterion value through iterations of the simulated annealing algorithm.

Details

This function uses the simulated annealing algorithm provided in the optim function to find optimal block designs for a Poisson generalised linear mixed model. The linear predictor for the experimental unit j in block i using this model is:

$\eta_[R(i,j)] = \mu + \tau[R(i,j)] + B[i] + e[i,j]$

where i = 1,...,b, j=1,...,k and there are b blocks each with k experimental units. R(i,j) is the treatment assigned to experimental unit j in block i.

References

Bush, S., and Ruggiero, K. (2016) Optimal block designs for experiments with responses drawn from a Poisson distribution, Under Review, preprint available at http://arxiv.org/abs/1601.00477

See Also

findOptimalExactDesign, findOptimalApproxDesign, updateDesign_BD, objfnA_BD, objfnD_BD

Examples

Run this code

## Constructing a D-optimal block design with 4 blocks of size 3 with seven treatments
## with means c(5,5.5,6,5.5,7,10,4) with between block standard deviation 0.3
## and no overdispersion (sigma=0). In each round of simulated annealing, we use 1000
## iterations

findOptimalBlockDesign(numblock = 4, blksize = 3, means = c(5,5.5,6,5.5,7,10,4),
  sigma = 0, sigmaB = 0.3,iter=1000)

## Constructing an A-optimal design with the same means

findOptimalBlockDesign(numblock = 4, blksize = 3, means = c(5,5.5,6,5.5,7,10,4),
  sigma = 0, sigmaB = 0.3, criterion = "A",iter=1000)

Run the code above in your browser using DataLab