Package 'optrcdmaeAT'

Title: Optimal Row-Column Designs for Two-Colour cDNA Microarray Experiments
Description: Computes A-, MV-, D- and E-optimal or near-optimal 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 pairwise treatment contrasts. The algorithms used in this package are based on the array exchange and treatment exchange algorithms adopted from Debusho, Gemechu and Haines (2016, unpublished) algorithms after adjusting for the row-column designs setup. 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: Legesse Kassa Debusho, Dibaba Bayisa Gemechu, and Linda Haines
Maintainer: Dibaba Bayisa Gemechu <[email protected]>
License: GPL-2
Version: 1.0.0
Built: 2024-10-31 19:57:35 UTC
Source: CRAN

Help Index


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 row-column design.

Usage

cmatrcd.mae(trt.N, col.N, theta, des)

Arguments

trt.N

integer, specifying number of treatments, v.

col.N

integer, specifying number of arrays (columns), 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.

des

matrix, a 2 x b row-column design with b arrays/columns of size k = 2 and v treatments.

Value

Returns a v x v treatment information matrix (C-matrix).

Author(s)

Legesse Kassa Debusho, Dibaba Bayisa Gemechu, 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. (2015). A-and D-optional row-column designs for two-colour cDNA microarray experiments using linear mixed effects models. South African Statistical Journal, 49, 153-168.

See Also

optrcdmaeAT, fixparrcd.mae, intcrcd.mae

Examples

##Information matrix

     trt.N <- 3 
     col.N <- 3 
     theta <- 0.1 
     rcdes <- intcrcd.mae(trt.N = 3, col.N = 3)

     cmatrcd.mae(trt.N = 3, col.N = 3, theta = 0.1, des = rcdes)

Sets parametric values

Description

Creates a GUI tcltk window that allow the users to set or fix values for the parametric combinations to compute optimal or near-optimal row-column designs.

Usage

fixparrcd.mae(Optcrit)

Arguments

Optcrit

character, specifying the optimality criteria to be used. Optcrit takes the letter "A", "MV", "D" and "E" for A-, MV-, D- and E-optimal or near-optimal row-column designs, respectively.

Details

fixparrcd.mae creates a pop-up GUI tcltk window that allow the users to set the parametric combinations to compute optimal or near-optimal row-column designs. The parameters include the number of treatments trt.N, number arrays col.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 row-column 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 row-column 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 optrcdmaeAT, the summary of the resultant optimal or near-optimal row-column 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 row-column designs.

Value

The fixparrcd.mae function creates a pop-up tcltk window that allow the users to set the parametric combinations to compute optimal or near-optimal row-column designs.

Author(s)

Legesse Kassa Debusho, Dibaba Bayisa Gemechu, and Linda Haines

See Also

optrcdmaeAT, mmenurcd.mae, tcltk, TkWidgets


Creates the graphical layout of resultant optimal row-column design

Description

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

Usage

graphoptrcd.mae(trt.N, col.N, theta, OptdesF, Optcrit, cbVal2)

Arguments

trt.N

integer, specifying number of treatments, v.

col.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 row-column 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 row-column 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 cbVal2 = 1, the function will display the graphical layout of the resultant optimal design generated using the array exchange algorithm.

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 row-column design 'OptdesF' on a separate pop-up window. Furthermore, the function graphoptrcd.mae saves the graphical layout of the resultant optimal or near-optimal row-column 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)

Legesse Kassa Debusho, Dibaba Bayisa Gemechu, and Linda Haines

See Also

igraph

Examples

##To create the graphical layout of the D-optimal row-column design
    ##obtained using the treatment exchange algorithm for 
    
    trt.N <- 10  #Number of treatments
    
    col.N <- 10  #Number of arrays
    
    theta <- 0.2 #theta value 
    
    OptdesF <- rbind(1:10, c(2:10, 1)) #D-optimal design (loop design)

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

Generates initial connected row-column design

Description

Generates a random initial connected row-column design for a given number of arrays b of size k = 2 and the number of treatments v.

Usage

intcrcd.mae(trt.N, col.N)

Arguments

trt.N

integer, specifying number of treatments, v.

col.N

integer, specifying number of arrays, b.

Value

Returns a 2 x b connected row-column design with b arrays of size k = 2 and number of treatments v.

Author(s)

Legesse Kassa Debusho, Dibaba Bayisa Gemechu, 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.

Gemechu, D. B., Debusho, L. K., and Haines, L. M. (2015). A-and D-optional row-column designs for two-colour cDNA microarray experiments using linear mixed effects models. South African Statistical Journal, 49, 153-168.

See Also

optrcdmaeAT, cmatrcd.mae

Examples

#Initial connected row-column design for 
    trt.N <- 4 #Number of treatments
    col.N <- 4 #Number of arrays

    intcrcd.mae(trt.N = 4, col.N = 4)

Optimal row-column designs for two-colour cDNA microarray experiments

Description

Used to compute A-, MV-, D- or E-optimal or near-optimal row-column 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) after adjusting to the row-column setup.

Usage

optrcdmaeAT(trt.N, col.N, theta, nrep, itr.cvrgval, Optcrit = "", Alg = "", ...)

## Default S3 method:
optrcdmaeAT(trt.N, col.N, theta, nrep, itr.cvrgval, Optcrit = "", Alg = "", ...)
## S3 method for class 'optrcdmaeAT'
print(x, ...)
## S3 method for class 'optrcdmaeAT'
summary(object, ...)

Arguments

trt.N

integer, specifying number of treatments, v.

col.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.

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. Optcrit takes the letter "A", "MV", "D" and "E" for A-, MV-, D- and E-optimal or near-optimal row-column designs, respectively.

x

the object to be printed.

object

an object of class "optrcdmaeAT".

Alg

character string used to specify the algorithm to be used. Possible values of Alg are Alg="trtE" for the treatment exchange algorithm and Alg="arrayE" for the array exchange algorithm: see 'Details'.

...

not used.

Details

optrcdmaeAT computes optimal or near-optimal row-column 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 row-column designs via calling of eight sub-functions Aoptrcd.maeT, Aoptrcd.maeA, MVoptrcd.maeT, MVoptrcd.maeA, Doptrcd.maeT, Doptrcd.maeA, Eoptrcd.maeT and Eoptrcd.maeA, respectively. Each function requires an initial connected row-column designs, generated using the function intcrcd.mae.

The minimum value of trt.N and col.N is 3 and trt.N should be less than or equal to col.N. The linear fixed effects model results for given trt.N and col.N are obtained by setting theta = 0.0.

Alg specifies the array exchange and treatment exchange algorithm to be used that is adopted from Debusho, Gemechu and Haines (2016) after adjusting for the row-column designs setup. If Alg = "trtE", the function optrcdmaeAT 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 optrcdmaeAT 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 col.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 col.N or nrep or all of them increase, computer time required to generate optimal or near-optimal row-column design increases.

itr.cvrgval number of iterations during exchange procedure. It takes a value between 2 and col.N. It is used to speedup the computer search time by setting how long 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 col.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 > col.N and it will automatically set itr.cvrgval = col.N. The smaller the itr.cvrgval means the faster the exchange procedure is, but this will reduce the chance of getting optimal row-column design and users are advised to set itr.cvrgval closer to col.N.

Remark: After the treatment exchange or array exchange procedure is completed, a dye-flip procedure is added to the internal functions of optrcdmaeAT stated above to further insure the optimality of the resulting optimal or near-optimal row-column designs. Thus, the procedure will flip (interchange) the treatments position within each array (column) and select the optimal dye-flip based on the optimality criteria of interest. This step is effective only for the large number of arrays and is efficient if itr.cvgval < col.N and there is a jump in the array exchange or treatment exchange procedure as stated above under the detail description of itr.cvrgval.

Value

Returns the resultant A-, MV-, D- or E-optimal or near-optimal row-column design with its corresponding score value and parametric combination saved in excel file in a working directory. In addition, the function optrcdmaeAT displays the graphical layout of the resultant optimal or near-optimal row-column designs. Specifically:

call

the method call.

v

number of treatments.

b

number of arrays.

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 2 x col.N obtained optimal or near-optimal row-column design.

Optcrtsv

score value of the optimality criteria 'Optcrit' of the resultant optimal or near-optimal row-column design 'OptdesF'.

file_loc, file_loc2

location where the summary of the resultant optimal or near-optimal row-column design is saved in .csv format.

equireplicate

logical value indicating whether the resultant optimal or near-optimal row-column design is equireplicate or not.

vtrtrep

vector of treatment replication of the resultant optimal or near-optimal row-column design.

Cmat

the C-matrix or treatment information matrix of the optimal or near-optimal row-column design.

The graphical layout of the resultant optimal or near-optimal row-column design.

NB: The function optrcdmaeAT also saves the summary of the resultant optimal or near-optimal row-column design in .csv format in the working directory. Furthermore, the function reports only one final optimal or near-optimal row-column design, however, there is a possibility of more than one optimal or near-optimal row-column designs for a given parametric combination. The function graphoptrcd.mae can be used to view and rearrange the graphical layout of the resultant optimal or near-optimal row-column design on tcltk window. Alternative to the function optrcdmaeAT, a GUI tcltk window can be used to generate optimal or near-optimal row-column designs, see mmenurcd.mae and fixparrcd.mae.

Author(s)

Legesse Kassa Debusho, Dibaba Bayisa Gemechu, and Linda Haines

References

Debusho, L. K., Gemechu, D. B., and Haines, L. M. (2016). Algorithmic construction of optimal row-column 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.

Gemechu, D. B., Debusho, L. K., and Haines, L. M. (2015). A-and D-optional row-column designs for two-colour cDNA microarray experiments using linear mixed effects models. South African Statistical Journal, 49, 153-168.

See Also

mmenurcd.mae, fixparrcd.mae, intcrcd.mae

Examples

##To obtain the A-optimal or near-optimal row-column design 
  ##using treatment exchange algorithm, set
  trt.N <- 3 #Number of treatments
  col.N <- 3 #Number of arrays
  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
  
  Aoptrcdes <- optrcdmaeAT(trt.N = 3, col.N = 3, theta = 0, nrep = 5, 
                            itr.cvrgval = 6, Optcrit = "A", Alg = "trtE")
  
  summary(Aoptrcdes)

Internal functions

Description

Functions for internal usage only.

Usage

## Computes A-optimal or near-optimal row-column designs
## using array exchange algorithm
Aoptrcd.maeA(trt.N, col.N, theta, nrep, itr.cvrgval)
 
## Computes A-optimal or near-optimal row-column designs
## using treatment exchange algorithm
Aoptrcd.maeT(trt.N, col.N, theta, nrep, itr.cvrgval)
 
## Computes MV-optimal or near-optimal row-column designs
## using array exchange algorithm
MVoptrcd.maeA(trt.N, col.N, theta, nrep, itr.cvrgval)
 
## Computes MV-optimal or near-optimal row-column designs
## using treatment exchange algorithm
MVoptrcd.maeT(trt.N, col.N, theta, nrep, itr.cvrgval)
 
## Computes D-optimal or near-optimal row-column designs
## using array exchange algorithm
Doptrcd.maeA(trt.N, col.N, theta, nrep, itr.cvrgval)
 
## Computes D-optimal or near-optimal row-column designs
## using treatment exchange algorithm
Doptrcd.maeT(trt.N, col.N, theta, nrep, itr.cvrgval)
 
## Computes E-optimal or near-optimal row-column designs
## using array exchange algorithm
Eoptrcd.maeA(trt.N, col.N, theta, nrep, itr.cvrgval)
 
## Computes E-optimal or near-optimal row-column designs
## using treatment exchange algorithm
Eoptrcd.maeT(trt.N, col.N, theta, nrep, itr.cvrgval)

Arguments

trt.N

integer, specifying number of treatments, v.

col.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.

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 optrcdmaeAT documentation for details.

Details

These functions are handled via a generic function optrcdmaeAT. Please refer to the optrcdmaeAT documentation for details.

Author(s)

Legesse Kassa Debusho, Dibaba Bayisa Gemechu, 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.

Gemechu, D. B., Debusho, L. K., and Haines, L. M. (2015). A-and D-optional row-column designs for two-colour cDNA microarray experiments using linear mixed effects models. South African Statistical Journal, 49, 153-168.

See Also

optrcdmaeAT