Version: | 1.0.2 |
Date: | 2025-05-25 |
Title: | Optimal Block Designs for Two-Colour cDNA Microarray Experiments |
Author: | Dibaba Bayisa Gemechu [aut, cre], Legesse Kassa Debusho [aut], Linda Haines [aut] |
Maintainer: | Dibaba Bayisa Gemechu <diboobayu@gmail.com> |
Depends: | R (≥ 3.3.1), MASS, Matrix, igraph, tcltk |
License: | GPL-2 |
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 (2018) <doi:10.1080/03610918.2018.1429617>. The package also provides an optional method of using the graphical user interface (GUI) R package tcltk to ensure that it is user friendly. |
NeedsCompilation: | no |
Packaged: | 2025-05-24 23:22:51 UTC; dgemechu |
Repository: | CRAN |
Date/Publication: | 2025-05-24 23:50:03 UTC |
Computes the treatment information matrix
Description
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.
Usage
cmatbd.mae(trt.N, blk.N, theta, des)
Arguments
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 |
Value
Returns a v x v
treatment information matrix (C-matrix).
Author(s)
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
References
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.
See Also
optbdmaeAT
, fixparbd.mae
, intcbd.mae
Examples
##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)
Sets parametric values
Description
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.
Usage
fixparbd.mae(Optcrit)
Arguments
Optcrit |
character, specifying the optimality criteria to be used. |
Details
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.
Value
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.
Author(s)
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
See Also
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, |
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 |
Details
Detail discussions concerning the constructions of a graphs can be found in igraph
R package.
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.
Note
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.
Author(s)
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
Examples
##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 initial connected block design
Description
Generates a random initial connected block design for a given number of blocks b
of size k = 2
and the number of treatments v
.
Usage
intcbd.mae(trt.N, blk.N)
Arguments
trt.N |
integer, specifying number of treatments, |
blk.N |
integer, specifying number of arrays, |
Value
Returns a 2 x b
connected block design with b
blocks of size k = 2
and number of treatments v
.
Author(s)
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
References
Debusho, L. K., Gemechu, D. B. and Haines, L. (2018). Algorithmic construction of optimal block designs for two-colour cDNA microarray experiments using the linear mixed effects model. Communications in Statistics - Simulation and Computation, https://doi.org/10.1080/03610918.2018.1429617.
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.
See Also
Examples
#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)
Creates the main menu tcltk window
Description
Alternative to directly using the function optbdmaeAT
on the R console, the function mmenubd.mae
creates the main menu tcltk window with the list of four optimality criteria (A, MV, D and E) for search of optimal or near-optimal block designs for two-colour cDNA microarray experiments.
Usage
mmenubd.mae()
Details
The main menu window created using the function mmenubd.mae
contains the list of four optimality criteria (the A-,
MV -, D- and E) for block designs that allows user to choose an optimality criterion of interest. The function
will then call for a function fixpar.mae
for further option regarding the setup of parametric combinations and output, see fixpar.mae
documentation.
Author(s)
Dibaba B. Gemechu, Legesse K. Debusho, and Linda M. Haines
See Also
Optimal block designs for two-colour cDNA microarray experiments
Description
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 (2018) <doi.org/10.1080/03610918.2018.1429617>.
Usage
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, ...)
Arguments
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. |
Details
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 (2018). 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
.
Value
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
.
Author(s)
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
References
Debusho, L. K., Gemechu, D. B. and Haines, L. (2018). Algorithmic construction of optimal block designs for two-colour cDNA microarray experiments using the linear mixed effects model. Communications in Statistics - Simulation and Computation, https://doi.org/10.1080/03610918.2018.1429617.
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.
See Also
mmenubd.mae
, fixparbd.mae
, intcbd.mae
Examples
##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)
Internal functions
Description
Functions for internal usage only.
Usage
## 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)
Arguments
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 |
Details
These functions are handled via a generic function optbdmaeAT
. Please refer to the optbdmaeAT
documentation for details.
Author(s)
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
References
Debusho, L. K., Gemechu, D. B. and Haines, L. (2018). Algorithmic construction of optimal block designs for two-colour cDNA microarray experiments using the linear mixed effects model. Communications in Statistics - Simulation and Computation, https://doi.org/10.1080/03610918.2018.1429617.
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.