updateDesign_BD: Updating a Block Design

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

View source: R/updateDesign_BD.R

Description

This function provides an update function for finding block designs. This function works by by making one or more substitutions. The number of substitutions made and the probability of making a particular number of substitution is given in a vector of probabilities.

Usage

1
updateDesign_BD(des,ntmt,blksz,sigb=0,sige=0,means=c(1,1),probs=c(1))

Arguments

des

a vector indicating the initial design to which we will make substitutions.

ntmt

a numeric indicating the number of treatments in the design.

blksz

an integer specifying the number of experimental units that are in each block. For this function, the block size is constant across all blocks.

sigb

a numeric indicating the between block standard deviation.

sige

a numeric indicating the within block standard deviation in excess of the Poisson residual error.

means

a vector specifying the means for each treatment group.

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.

Details

This function is designed to work with findOptimalBlockDesign, and as such shares the arguments of objfnA_BD and objfnD_BD. It can, however, be used on its own. The sige, sigb, and means arguments are not used in this function, but are in objfnA_BD and objfnD_BD. If using this function on its own, then these terms may be omitted without changing the result of the function.

Value

Returns a vector containing the new design in flattened form.

Author(s)

Stephen Bush (stephen.b[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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Suppose that we have a block design ((1,1,2,2),(1,1,2,3),(1,2,2,3)) and would like to
# replace exactly one entry with a randomly sampled treatment. Then we set the probability
# that one entry is replaced equal to 1.

updateDesign_BD(des=c(1,1,2,2,1,1,2,3,1,2,2,3),ntmt=3,blksz=4,probs=c(1))

# Now suppose that we would like to replace one entry with probability 0.6 and replace
# two entries with probability 0.4 then probs=c(0.6,0.4).

updateDesign_BD(des=c(1,1,2,2,1,1,2,3,1,2,2,3),ntmt=3,blksz=4,probs=c(0.6,0.4))

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