Boptbd (version 1.0.5)

graphoptBbd: Creates the graphical layout of resultant optimal design

Description

The function graphoptBbd creates the graphical layout of resultant Bayesian A-, or D-optimal block design on a separate pop-up GUI tcltk window.

Usage

graphoptBbd(trt.N, blk.N, alpha, beta, OptdesF, Optcrit)

Arguments

trt.N

integer, specifying number of treatments, v.

blk.N

integer, specifying number of blocks, b.

alpha

numeric, representing parameter of beta distribution.

beta

numeric, representing parameter of beta distribution.

OptdesF

matrix, a 2 x b obtained Bayesian optimal block design.

Optcrit

character specifying the optimality criteria to be used. Thus, Optcrit takes the letter "A" and "D" for Bayesian A- and D-optimal block designs, respectively.

Value

Returns the graphical layout of the resultant Bayesian optimal block design 'OptdesF' on a separate pop-up window. Furthermore, the function saves the graphical layout of the resultant Bayesain optimal block design in .pdf format in a temporary directory.

Details

Detail discussions concerning the constructions of a graphs can be found in igraph R package.

See Also

igraph

Examples

Run this code
# NOT RUN {
    ##To create the graphical layout of the D-optimal block design
    ##obtained using the treatment exchange algorithm for 
    trt.N <- 10  #Number of treatments
    blk.N <- 10  #Number of blocks
    alpha <- 0.1 #alpha value 
    beta  <- 0.1 #beta value 
    OptdesF <- rbind(1:10, c(2:10,1)) #Bayesian A-optimal block design (loop design)

    graphoptBbd(trt.N = 10, blk.N = 10, alpha = 0.1, beta = 0.1, OptdesF, Optcrit = "A")
# }

Run the code above in your browser using DataCamp Workspace