Learn R Programming

optbdmaeAT (version 1.0.1)

graphoptbd.mae: Creates the graphical layout of resultant optimal design

Description

Creates the graphical layout of resultant A-, MV-, D- or E-optimal or near-optimal block design on a separate pop-up GUI tcltk window.

Usage

graphoptbd.mae(trt.N, blk.N, theta, OptdesF, Optcrit, cbVal2)

Arguments

trt.N
integer, specifying number of treatments, v.
blk.N
integer, specifying number of arrays, b.
theta
numeric, representing a function of the ratio of random array variance and random error variance. It takes any value between 0 and 1, inclusive.
OptdesF
matrix, a 2 x b obtained optimal or near-optimal block design.
Optcrit
character specifying the optimality criteria to be used. Thus, Optcrit takes the letter "A", "MV","D" and "E" for A-, MV-, D- and E-optimal or near-optimal block designs, respectively.
cbVal2
checkbox value. It takes a value of zero or one. The default value of cbVal2 is 0. Thus, if cbVal2 = 0, the function will display the graphical layout of the resultant optimal design generated using the treatment exchange algorithm. Similarly, if cbVal = 1, the function will display the graphical layout of the resultant optimal design generated using the array exchange algorithm.

Value

Returns the graphical layout of the resultant optimal or near-optimal block design 'OptdesF' on a separate pop-up window. Furthermore, the function graphoptbd.mae saves the graphical layout of the resultant optimal or near-optimal block design in .pdf format in a working subdirectory.

Details

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

See Also

igraph

Examples

Run this code
    ##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
    theta <- 0.2 #theta value 
    OptdesF <- rbind(1:10, c(2:10,1)) #D-optimal design (loop design)

    graphoptbd.mae(trt.N = 10, blk.N = 10, theta = 0.2, OptdesF, Optcrit = "D", cbVal2 = 0)

Run the code above in your browser using DataLab