Title: | Sequential Optimal Designs for Two-Colour cDNA Microarray Experiments |
---|---|
Description: | Computes sequential A-, MV-, D- and E-optimal or near-optimal block and row-column 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 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.0 |
Built: | 2024-12-19 06:32:41 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 or row-column design.
cmatbrcd.mae(trt.N, blk.N, theta, des, dtype)
cmatbrcd.mae(trt.N, blk.N, theta, des, dtype)
trt.N |
integer, specifying number of treatments |
blk.N |
integer, specifying number of arrays (blocks or columns) |
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 |
dtype |
character, specifying the design type. For block designs, |
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.
##Information matrix trt.N <- 4 blk.N <- 4 theta <- 0.3 dsgn <- rbind(1:4,c(2:4,1)) dtype <- "rcd" cmatbrcd.mae(trt.N = 4, blk.N = 4, theta = 0.2, des = dsgn, dtype = "rcd")
##Information matrix trt.N <- 4 blk.N <- 4 theta <- 0.3 dsgn <- rbind(1:4,c(2:4,1)) dtype <- "rcd" cmatbrcd.mae(trt.N = 4, blk.N = 4, theta = 0.2, des = dsgn, dtype = "rcd")
Creates a tcltk
window that allow the users to set or fix values for the parametric combinations and initial optimal or near-optimal design to compute sequential optimal or near-optimal block or row-column designs.
fixparsoptd.mae(Optcrit)
fixparsoptd.mae(Optcrit)
Optcrit |
character, specifying the optimality criteria to be used. |
fixparsoptd.mae
creates a pop-up tcltk window that allow the users to set
the parametric combinations and initial optimal or near-optimal designs to compute optimal or near-optimal block or row-column 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
, number of added treatments strt
, number of added arrays sary
and a button that allows users to insert initial optimal or near-optimal design des0
by typing into a pop-up sheet that will occur when clicking on the 'Insert' button. The users are not restricted to a specific dimension of the initial design, thus, the dimension of the initial design des0
can be 2 x blk.N
or blk.N x 2
. The default initial design des0
is a 3 x 2
loop/cyclic design.
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 sequential optimal or near-optimal block or row-column design, to make a choice between the two design types (block design and row-column designs) and to print the summary of the resultant sequential optimal or near-optimal 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 soptdmaeA
, the summary of the resultant sequential optimal or near-optimal design will be saved in the current working directory in .csv format. The graphical layout of resultant sequential optimal or near-optimal design together with that of the initial optimal or near-optimal design will also be displayed on R console.
The fixparsoptd.mae
function creates a pop-up tcltk window that allow the users to set
the parametric combinations to compute sequential optimal or near-optimal block or row-column designs.
Dibaba Bayisa Gemechu, Legesse Kassa Debusho, and Linda Haines
soptdmaeA
, mmenusoptd.mae
, tcltk
, TkWidgets
Creates the graphical layout of resultant sequential A-, MV-, D- or E-optimal or near-optimal block or row-column design on a separate pop-up GUI tcltk window.
graphsoptd.mae(trt.N, blk.N, theta, soptdesF, Optcrit, strt, sary, dtype)
graphsoptd.mae(trt.N, blk.N, theta, soptdesF, Optcrit, strt, sary, dtype)
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. |
soptdesF |
matrix, a |
Optcrit |
character specifying the optimality criteria to be used. Thus, |
strt |
a non-negative integer, specifying number of added treatments/conditions to the initial design. |
sary |
a non-negative integer, specifying number of added arrays to the initial design. |
dtype |
character, specifying the design type. For block designs, |
Detail discussions concerning the constructions of graph can be found in igraph
R package.
Returns the graphical layout of the resultant sequential optimal or near-optimal block or row-column design 'soptdesF
' on a separate pop-up window with the new edges (arrays) and vertices (treatments) added to the initial design coloured in red and brown, respectively, for separation purpose. Furthermore, the function graphsoptd.mae
saves the graphical layout of the initial des0
and resultant sequential optimal or near-optimal 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
Used to compute sequential A-, MV-, D- or E-optimal or near-optimal block and row-column designs for two-colour cDNA microarray experiments under either the linear fixed effects model or the linear mixed effects model settings using the array exchange algorithms of Debusho, Gemechu and Haines (2016).
soptdmaeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype, Optcrit = "", ...) ## Default S3 method: soptdmaeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype, Optcrit = "",...) ## S3 method for class 'soptdmaeA' print(x, ...) ## S3 method for class 'soptdmaeA' summary(object, ...)
soptdmaeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype, Optcrit = "", ...) ## Default S3 method: soptdmaeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype, Optcrit = "",...) ## S3 method for class 'soptdmaeA' print(x, ...) ## S3 method for class 'soptdmaeA' summary(object, ...)
trt.N |
integer, specifying number of treatments |
blk.N |
integer, specifying number of arrays (blocks or columns) |
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. |
strt |
a non-negative integer, specifying number of added treatments/conditions to the initial design. |
sary |
a non-negative integer, specifying number of added arrays to the initial design. |
des0 |
matrix, a |
dtype |
character, specifying the design type. For block designs, |
Optcrit |
character, specifying the optimality criteria to be used. |
x |
the object to be printed. |
object |
an object of class |
... |
not used. |
soptdmaeA
computes sequential optimal or near-optimal block or row-column designs for the two-colour cDNA microarray experiments where the interest is in a comparison of all possible elementary treatment contrasts for a given initial optimal or near-optimal designs. The function computes sequential A-, MV-, D- and E-optimal or near optimal block or row-column designs via calling of four sub-functions seqAoptbrcd.maeA
, seqMVoptbrcd.maeA
, seqDoptbrcd.maeA
, and seqEoptbrcd.maeA
, respectively. These functions uses the array exchange algorithm of Debusho, Gemechu and Haines (2016). Thus, once the parametric combinations of interest are sated, these functions will first compute, randomly, a new connected initial design with a new number of arrays and, optionally, a new number of treatments. Then they 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. The candidate arrays are lists of possible arrays with different treatment combinations and their lists are dependent of the number of arrays and treatments added to the initial optimal or near-optimal design. For example, if only one treatment and one array are to be added to the initial optimal or near-optimal design, then the candidate arrays will be only those arrays that consists of a new treatment together with the old treatments in the initial optimal or near-optimal design with or without considering their position within the array for row-column or block designs, respectively.
The minimum value of trt.N
and blk.N
is 3 and trt.N
should be less than or equal to blk.N - 1
. Thus, the least initial design should be of a design with 3 number of treatments and number of arrays. The minimum number of sary
and strt
are 1 and 0, respectively, and sary
should be greater than or equal to strt
.
The linear fixed effects model results for given parametric combinations and initial design are obtained by setting theta = 0.0
.
nrep
takes a value of greater than or equal to 1. However, to ensure optimality of the resultant design, for sary - strt > 0
,
the nrep
should be greater than or equal to 10. In addition, as trt.N
or blk.N
or sary
and/or strt
or all of them increase,
to ensure optimality of resultant design, it is advised to further increase the value of nrep
up to greater than or equal to 50. However, it has to be noted that as trt.N
or blk.N
or
nrep
or all of them increase, computer time required to generate sequential optimal or near-optimal design increases.
Returns the initial and resultant sequential A-, MV-, D- or E-optimal or near-optimal block or row-column design with their corresponding score value and parametric combination
saved in excel file in a working directory. In addition, the function soptdmaeA
displays the graphical layout of the initial and resultant
optimal or near-optimal block or row-column designs. Specifically:
call |
the method call. |
v |
number of treatments of obtained sequential design. |
b |
number of arrays of obtained sequential design. |
theta |
theta value. |
nrep |
number of replications of the optimization procedure. |
strt |
number of added treatments. |
sary |
number of added arrays. |
Optcrit |
optimality criteria. |
optdes0 |
a |
optcrtsv0 |
score value of the optimality criteria |
soptdesF |
a |
soptcrtsv |
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. |
equireplicate0 |
logical value indicating whether the initial optimal or near-optimal block or row-column design is equireplicate or not. |
vtrtrep0 |
vector of treatment replication of the initial optimal or near-optimal block or row-column design. |
equireplicate |
logical value indicating whether the resultant sequential optimal or near-optimal block or row-column design is equireplicate or not. |
vtrtrep |
vector of treatment replication of the resultant sequential optimal or near-optimal block or row-column design. |
Cmat |
the C-matrix or treatment information matrix of the obtained sequential optimal or near-optimal block or row-column design. |
The output also includes graphical layouts of the initial and resultant sequential optimal or near-optimal block or row-column design. The new edges (arrays) and vertices (treatments) added to the initial design are coloured in red and brown, respectively, for identification purpose.
NB: The function soptdmaeA
also saves the summary of the initial and resultant sequential optimal or near-optimal block or row-column design in .csv format in the working directory.
Furthermore, the function reports only one final sequential optimal or near-optimal block or row-column design, however, there is a possibility
of more than one sequential optimal or near-optimal block or row-column designs for a given parametric combination.
The function graphsoptd.mae
can be used to view and rearrange the graphical layout of the resultant
sequential optimal or near-optimal block or row-column design on tcltk
window. Alternative to the function soptdmaeA
, a
GUI tcltk window can be used to generate sequential optimal or near-optimal block or row-column designs, see mmenusoptd.mae
and fixparsoptd.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.
mmenusoptd.mae
, fixparsoptd.mae
##To obtain sequential A-optimal or near-optimal block design for a given ##initial A-optimal or near-optimal block design, set trt.N <- 3 #Number of treatments blk.N <- 3 #Number of blocks theta <- 0 #theta value nrep <- 10 #Number of replications strt <- 2 #Number of added treatments sary <- 3 #Number of added arrays des0 <- rbind(1:3, c(2, 3, 1)) #Initial design dtype = "blkd" #Design type Optcrit <- "A" #Optimality criteria seqAoptbd <- soptdmaeA(trt.N = 3, blk.N = 3, theta = 0, nrep = 10, strt = 2, sary = 3, des0, dtype = "blkd", Optcrit = "A") summary(seqAoptbd) ##To obtain sequential A-optimal or near-optimal row-column design for a given ##initial A-optimal or near-optimal row-column design des0 (stated above), set dtype = "rcd" #Design type seqAoptrcd <- soptdmaeA(trt.N = 3, blk.N = 3, theta = 0, nrep = 10, strt = 2, sary = 3, des0, dtype = "rcd", Optcrit = "A") summary(seqAoptrcd)
##To obtain sequential A-optimal or near-optimal block design for a given ##initial A-optimal or near-optimal block design, set trt.N <- 3 #Number of treatments blk.N <- 3 #Number of blocks theta <- 0 #theta value nrep <- 10 #Number of replications strt <- 2 #Number of added treatments sary <- 3 #Number of added arrays des0 <- rbind(1:3, c(2, 3, 1)) #Initial design dtype = "blkd" #Design type Optcrit <- "A" #Optimality criteria seqAoptbd <- soptdmaeA(trt.N = 3, blk.N = 3, theta = 0, nrep = 10, strt = 2, sary = 3, des0, dtype = "blkd", Optcrit = "A") summary(seqAoptbd) ##To obtain sequential A-optimal or near-optimal row-column design for a given ##initial A-optimal or near-optimal row-column design des0 (stated above), set dtype = "rcd" #Design type seqAoptrcd <- soptdmaeA(trt.N = 3, blk.N = 3, theta = 0, nrep = 10, strt = 2, sary = 3, des0, dtype = "rcd", Optcrit = "A") summary(seqAoptrcd)
Functions for internal usage only.
## Computes A-optimal or near-optimal block or row-column designs ## using array exchange algorithm seqAoptbrcd.maeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype) ## Computes MV-optimal or near-optimal block or row-column designs ## using array exchange algorithm seqMVoptbrcd.maeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype) ## Computes A-optimal or near-optimal block or row-column designs ## using array exchange algorithm seqDoptbrcd.maeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype) ## Computes A-optimal or near-optimal block or row-column designs ## using array exchange algorithm seqEoptbrcd.maeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype)
## Computes A-optimal or near-optimal block or row-column designs ## using array exchange algorithm seqAoptbrcd.maeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype) ## Computes MV-optimal or near-optimal block or row-column designs ## using array exchange algorithm seqMVoptbrcd.maeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype) ## Computes A-optimal or near-optimal block or row-column designs ## using array exchange algorithm seqDoptbrcd.maeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype) ## Computes A-optimal or near-optimal block or row-column designs ## using array exchange algorithm seqEoptbrcd.maeA(trt.N, blk.N, theta, nrep, strt, sary, des0, dtype)
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. |
strt |
a non-negative integer, specifying number of added treatments/conditions to the initial design. |
sary |
a non-negative integer, specifying number of added arrays to the initial design. |
des0 |
matrix, a |
dtype |
character, specifying the design type. For block designs, |
These functions are handled via a generic function soptdmaeA
. Please refer to the soptdmaeA
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.