findOptimalExactDesign: Find optimal Completely Randomised Design using Simulated...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/findOptimalExactDesign.R

Description

findOptimalExactDesign finds a D-optimal or A-optimal completely randomised design for a Poisson generalised linear model using simulated annealing.

Usage

1
2
3
findOptimalExactDesign(numunits, means, sigma, probs = c(1),criterion="D",
                        link="Poisson", trace = FALSE, iter = 10000, temp = 10,
                        tmax = 10, silent = FALSE, tol = 1e-04, maxtime = 60)

Arguments

numunits

the total number of experimental units in the design

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

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.

Details

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

η_[R(j)] = μ + τ[R(j)] + e[j]

where j=1,...,k and R(j) is the treatment assigned to experimental unit j.

Value

design

a matrix containing the optimal design.

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.

Author(s)

Stephen Bush ([email protected])

Katya Ruggiero ([email protected])

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

findOptimalBlockDesign, findOptimalApproxDesign, updateDesign_CRD, objfnA_CRD, objfnD_CRD

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Finding a D-optimal completely randomised design with 10 observations, three treatments
# with means 1,2, and 4 and no overdispersion.In each round of simulated annealing, we use 
# 1000 iterations

findOptimalExactDesign(numunits=10, means=c(1,2,4), sigma=0, criterion="D",iter=1000)

# Finding an A-optimal completely randomised design with 10 observations, three treatments
# with means 1,2, and 4 and no overdispersion.

findOptimalExactDesign(numunits=10, means=c(1,2,4), sigma=0, criterion="A",iter=1000)

designGLMM documentation built on May 30, 2017, 6:24 a.m.