Title: | Optimal Block Designs for Two-Colour cDNA Microarray Experiments |
---|---|
Description: | Computes A-, MV-, D- and E-optimal or near-optimal block designs for two-colour cDNA microarray experiments using the linear fixed effects and mixed effects models where the interest is in a comparison of all possible elementary treatment contrasts. The algorithms used in this package are based on the treatment exchange and array exchange algorithms of Debusho, Gemechu and Haines (2016, unpublished). The package also provides an optional method of using the graphical user interface (GUI) R package tcltk to ensure that it is user friendly. |
Authors: | Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines |
Maintainer: | Dibaba Bayisa Gemechu <[email protected]> |
License: | GPL-2 |
Version: | 1.0.1 |
Built: | 2024-10-31 19:48:14 UTC |
Source: | CRAN |
Computes the information matrix (C-matrix) for treatment effects under either the linear fixed effects model or the linear mixed effects model setting for a given block design of size 2.
cmatbd.mae(trt.N, blk.N, theta, des)
cmatbd.mae(trt.N, blk.N, theta, des)
trt.N |
integer, specifying number of treatments, |
blk.N |
integer, specifying number of arrays, |
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. |
des |
matrix, a |
Returns a v x v
treatment information matrix (C-matrix).
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
Debusho, L. K., Gemechu, D. B., and Haines, L. M. (2016). Algorithmic construction of optimal block designs for two-colour cDNA microarray experiments using the linear mixed model. Under review.
Gemechu D. B., Debusho L. K. and Haines L. M. (2014). A-optimal designs for two-colour cDNA microarray experiments using the linear mixed effects model. Peer-reviewed Proceedings of the Annual Conference of the South African Statistical Association for 2014 (SASA 2014), Rhodes University, Grahamstown, South Africa. pp 33-40, ISBN: 978-1-86822-659-7.
optbdmaeAT
, fixparbd.mae
, intcbd.mae
##Information matrix trt.N <- 3 blk.N <- 3 theta <- 0.2 dsgn <- intcbd.mae(trt.N = 3, blk.N = 3) cmatbd.mae(trt.N = 3, blk.N = 3, theta = 0.2, des = dsgn)
##Information matrix trt.N <- 3 blk.N <- 3 theta <- 0.2 dsgn <- intcbd.mae(trt.N = 3, blk.N = 3) cmatbd.mae(trt.N = 3, blk.N = 3, theta = 0.2, des = dsgn)
Creates a tcltk
widow that allow the users to set or fix values for the parametric combinations to compute optimal or near-optimal block designs.
fixparbd.mae(Optcrit)
fixparbd.mae(Optcrit)
Optcrit |
character, specifying the optimality criteria to be used. |
fixparbd.mae
creates a pop-up tcltk window that allow the users to set
the parametric combinations to compute optimal or near-optimal block designs. The parameters include the number of treatments trt.N
, number arrays blk.N
,
theta value theta
, number of replications of the optimization procedure nrep
and number of iterations required during exchange procedure itr.cvrgval
.
Furthermore, on this window, the checkbox options that allow the users to choose whether or not they need to have the graphical
layout of the resultant optimal or near-optimal block design, to make a choice between the two-alternative algorithms
(treatment exchange and array exchange algorithms) and to print the summary of the resultant optimal or near-optimal block design on
R-console directly are available.
After setting all the required parametric combinations and selecting the algorithm of interest,
clicking on the search button on the set parametric combinations tcltk window, similar to the results that
can be obtained when using the function optbdmaeAT
, the summary of the resultant optimal or near-optimal
block design will be saved in the current working directory in .csv format and it will also be displayed on R console with
graphical layout of the resultant optimal or near-optimal block designs.
The fixparbd.mae
function creates a pop-up tcltk window that allow the users to set
the parametric combinations to compute optimal or near-optimal block designs.
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
optbdmaeAT
, mmenubd.mae
, tcltk
, TkWidgets
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.
graphoptbd.mae(trt.N, blk.N, theta, OptdesF, Optcrit, cbVal2)
graphoptbd.mae(trt.N, blk.N, theta, OptdesF, Optcrit, cbVal2)
trt.N |
integer, specifying number of treatments, |
blk.N |
integer, specifying number of arrays, |
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 |
Optcrit |
character specifying the optimality criteria to be used. Thus, |
cbVal2 |
checkbox value. It takes a value of zero or one. The default value of |
Detail discussions concerning the constructions of a graphs can be found in igraph
R package.
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.
When closing a pop-up window for graphical layout of the resultant designs (Graph plot), if the window is closed by
clicking on the red button with "X" sign (top-right), the warning message "Warning message: In rm(list = cmd,
envir = .tkplot.env):
object 'tkp ...' not found"
will occur in R console irrespective of what command is executed next. To resolve this warning message, click
on "close
" menu that is located at the top-left of the graph plot pop-up window when closing this window.
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
##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)
##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)
Generates a random initial connected block design for a given number of blocks b
of size k = 2
and the number of treatments v
.
intcbd.mae(trt.N, blk.N)
intcbd.mae(trt.N, blk.N)
trt.N |
integer, specifying number of treatments, |
blk.N |
integer, specifying number of arrays, |
Returns a 2 x b
connected block design with b
blocks of size k = 2
and number of treatments v
.
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
Debusho, L. K., Gemechu, D. B., and Haines, L. M. (2016). Algorithmic construction of optimal block designs for two-colour cDNA microarray experiments using the linear mixed model. Under review.
Gemechu D. B., Debusho L. K. and Haines L. M. (2014). A-optimal designs for two-colour cDNA microarray experiments using the linear mixed effects model. Peer-reviewed Proceedings of the Annual Conference of the South African Statistical Association for 2014 (SASA 2014), Rhodes University, Grahamstown, South Africa. pp 33-40, ISBN: 978-1-86822-659-7.
#Initial connected block design for trt.N <- 4 #Number of treatments blk.N <- 4 #Number of blocks intcbd.mae(trt.N = 4, blk.N = 4)
#Initial connected block design for trt.N <- 4 #Number of treatments blk.N <- 4 #Number of blocks intcbd.mae(trt.N = 4, blk.N = 4)
Used to compute A-, MV-, D- or E-optimal or near-optimal block designs for two-colour cDNA microarray experiments under either the linear fixed effects model or the linear mixed effects model settings using either the array exchange or treatment exchange algorithms of Debusho, Gemechu and Haines (2016).
optbdmaeAT(trt.N, blk.N, theta, nrep, itr.cvrgval, Optcrit = "", Alg = "", ...) ## Default S3 method: optbdmaeAT(trt.N, blk.N, theta, nrep, itr.cvrgval, Optcrit = "", Alg = "", ...) ## S3 method for class 'optbdmaeAT' print(x, ...) ## S3 method for class 'optbdmaeAT' summary(object, ...)
optbdmaeAT(trt.N, blk.N, theta, nrep, itr.cvrgval, Optcrit = "", Alg = "", ...) ## Default S3 method: optbdmaeAT(trt.N, blk.N, theta, nrep, itr.cvrgval, Optcrit = "", Alg = "", ...) ## S3 method for class 'optbdmaeAT' print(x, ...) ## S3 method for class 'optbdmaeAT' summary(object, ...)
trt.N |
integer, specifying number of treatments, |
blk.N |
integer, specifying number of arrays, |
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. |
nrep |
integer, specifying number of replications of the optimization procedure. |
itr.cvrgval |
integer, specifying number of iterations required for convergence during the exchange procedure. |
Optcrit |
character, specifying the optimality criteria to be used. |
x |
the object to be printed. |
object |
an object of class |
Alg |
character string used to specify the algorithm to be used. Possible values of |
... |
not used. |
optbdmaeAT
computes optimal or near-optimal block design for the two-colour cDNA microarray experiments
where the interest is in a comparison of all possible elementary treatment contrasts. The function computes A-, MV-, D- and E-optimal
or near optimal block designs via calling of eight sub-functions Aoptbd.maeT
, Aoptbd.maeA
,
MVoptbd.maeT
, MVoptbd.maeA
, Doptbd.maeT
, Doptbd.maeA
,
Eoptbd.maeT
and Eoptbd.maeA
, respectively. Each function requires an initial connected block designs,
generated using the function intcbd.mae
.
The minimum value of trt.N
and blk.N
is 3 and trt.N
should be less than or equal to blk.N - 1
.
The linear fixed effects model results for given trt.N
and blk.N
are obtained by setting theta = 0.0
.
Alg
specifies the exchange algorithm of Debusho, Gemechu and Haines (2016). If Alg = "trtE"
, the function
optbdmaeAT
perform the treatment exchange procedure through deletion and addition of treatments at a time and selects a
design with best treatment exchange with respect to the optimality criterion value. If Alg = "arrayE"
, the function
optbdmaeAT
perform the array exchange procedure through deletion and addition of candidate arrays at a time and selects a
design with best array exchange with respect to the optimality criterion value.
nrep
takes a value of greater than or equal to 2. However, to ensure optimality of the resultant design,
the nrep
should be greater than or equal to 10 and in addition, as trt.N
and blk.N
increase,
to ensure optimality of resultant design, it is advised to further increase the value of nrep
up to greater than or equal to 100. However, it has to be noted that as trt.N
or blk.N
or
nrep
or all of them increses, computer time required to generate optimal or near-optimal
block design increases.
itr.cvrgval
number of iterations during exchange procedure. It takes a value between 2 and blk.N
. It is used
to speedup the computer search time by setting how long should the user should wait for the exchange process to obtain any
different (if any) design than the one that was produced as the result of the preceding exchange of the current array in the initial
design with candidate array. This is mainly effective if blk.N
is very large. For example itr.cvrgval = 2
, means the
exchange procedure will jump to the next array test if the exchange of the two preceding arrays with candidate arrays results with the
same efficient designs. The function will not give error message if the users set itr.cvrgval > blk.N
and it will automatically
set itr.cvrgval = blk.N
. The smaller the itr.cvrgval
means the faster the exchange procedure is, but this will reduce the
chance of getting optimal block design and users are advised to set itr.cvrgval
closer to blk.N
.
Returns the resultant A-, MV-, D- or E-optimal or near-optimal block design with its corresponding score value and parametric combination
saved in excel file in a working directory. In addition, the function optbdmaeAT
displays the graphical layout of the resultant
optimal or near-optimal block designs. Specifically:
call |
the method call. |
v |
number of treatments. |
b |
number of blocks |
theta |
theta value. |
nrep |
number of replications of the optimization procedure. |
itr.cvrgval |
number of iterations required for convergence during the exchange procedure. |
Optcrit |
optimality criteria. |
Alg |
algorithm used. |
OptdesF |
a |
Optcrtsv |
score value of the optimality criteria |
file_loc , file_loc2
|
location where the summary of the resultant optimal or near-optimal block design is saved in .csv format. |
equireplicate |
logical value indicating whether the resultant optimal or near-optimal block design is equireplicate or not. |
vtrtrep |
vector of treatment replication of the resultant optimal or near-optimal block design. |
Cmat |
the C-matrix or treatment information matrix of the optimal or near-optimal block design. |
The graphical layout of the resultant optimal or near-optimal block design.
NB: The function optbdmaeAT
also saves the summary of the resultant optimal or near-optimal block design in .csv format in the working directory.
Furthermore, the function reports only one final optimal or near-optimal block design, however, there is a possibility
of more than one optimal or near-optimal block designs for a given parametric combination.
The function graphoptbd.mae
can be used to view and rearrange the graphical layout of the resultant
optimal or near-optimal block design on tcltk
window. Alternative to the function optbdmaeAT
, a
GUI tcltk window can be used to generate optimal or near-optimal block designs, see mmenubd.mae
and fixparbd.mae
.
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
Debusho, L. K., Gemechu, D. B., and Haines, L. M. (2016). Algorithmic construction of optimal block designs for two-colour cDNA microarray experiments using the linear mixed model. Under review.
Gemechu D. B., Debusho L. K. and Haines L. M. (2014). A-optimal designs for two-colour cDNA microarray experiments using the linear mixed effects model. Peer-reviewed Proceedings of the Annual Conference of the South African Statistical Association for 2014 (SASA 2014), Rhodes University, Grahamstown, South Africa. pp 33-40, ISBN: 978-1-86822-659-7.
mmenubd.mae
, fixparbd.mae
, intcbd.mae
##To obtain the A-optimal or near-optimal block design using treatment exchange algorithm, set trt.N <- 3 #Number of treatments blk.N <- 3 #Number of blocks theta <- 0 #theta value nrep <- 5 #Number of replications itr.cvrgval <- 6 #Number of iterations required during the exchange procedure Optcrit <- "A" #Optimality criteria Alg <- "trtE" #Algorithm Aoptexample <- optbdmaeAT(trt.N = 3, blk.N = 3, theta = 0, nrep = 5, itr.cvrgval = 6, Optcrit = "A", Alg = "trtE") summary(Aoptexample)
##To obtain the A-optimal or near-optimal block design using treatment exchange algorithm, set trt.N <- 3 #Number of treatments blk.N <- 3 #Number of blocks theta <- 0 #theta value nrep <- 5 #Number of replications itr.cvrgval <- 6 #Number of iterations required during the exchange procedure Optcrit <- "A" #Optimality criteria Alg <- "trtE" #Algorithm Aoptexample <- optbdmaeAT(trt.N = 3, blk.N = 3, theta = 0, nrep = 5, itr.cvrgval = 6, Optcrit = "A", Alg = "trtE") summary(Aoptexample)
Functions for internal usage only.
## Computes A-optimal or near-optimal block designs ## using array exchange algorithm Aoptbd.maeA(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes A-optimal or near-optimal block designs ## using treatment exchange algorithm Aoptbd.maeT(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes MV-optimal or near-optimal block designs ## using array exchange algorithm MVoptbd.maeA(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes MV-optimal or near-optimal block designs ## using treatment exchange algorithm MVoptbd.maeT(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes D-optimal or near-optimal block designs ## using array exchange algorithm Doptbd.maeA(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes D-optimal or near-optimal block designs ## using treatment exchange algorithm Doptbd.maeT(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes E-optimal or near-optimal block designs ## using array exchange algorithm Eoptbd.maeA(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes E-optimal or near-optimal block designs ## using treatment exchange algorithm Eoptbd.maeT(trt.N, blk.N, theta, nrep, itr.cvrgval)
## Computes A-optimal or near-optimal block designs ## using array exchange algorithm Aoptbd.maeA(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes A-optimal or near-optimal block designs ## using treatment exchange algorithm Aoptbd.maeT(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes MV-optimal or near-optimal block designs ## using array exchange algorithm MVoptbd.maeA(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes MV-optimal or near-optimal block designs ## using treatment exchange algorithm MVoptbd.maeT(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes D-optimal or near-optimal block designs ## using array exchange algorithm Doptbd.maeA(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes D-optimal or near-optimal block designs ## using treatment exchange algorithm Doptbd.maeT(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes E-optimal or near-optimal block designs ## using array exchange algorithm Eoptbd.maeA(trt.N, blk.N, theta, nrep, itr.cvrgval) ## Computes E-optimal or near-optimal block designs ## using treatment exchange algorithm Eoptbd.maeT(trt.N, blk.N, theta, nrep, itr.cvrgval)
trt.N |
integer, specifying number of treatments, |
blk.N |
integer, specifying number of arrays, |
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. |
nrep |
integer, specifying number of replications of the optimization procedure. |
itr.cvrgval |
integer, specifying number of iterations required for convergence during the exchange procedure. See |
These functions are handled via a generic function optbdmaeAT
. Please refer to the optbdmaeAT
documentation for details.
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
Debusho, L. K., Gemechu, D. B., and Haines, L. M. (2016). Algorithmic construction of optimal block designs for two-colour cDNA microarray experiments using the linear mixed model. Under review.
Gemechu D. B., Debusho L. K. and Haines L. M. (2014). A-optimal designs for two-colour cDNA microarray experiments using the linear mixed effects model. Peer-reviewed Proceedings of the Annual Conference of the South African Statistical Association for 2014 (SASA 2014), Rhodes University, Grahamstown, South Africa. pp 33-40, ISBN: 978-1-86822-659-7.