| Title: | Order-of-Addition Experiments |
| Version: | 0.1.0 |
| Description: | Order-of-addition experiments are often conducted to address research questions in many real-world studies. This package provides a comprehensive toolbox for researchers and practitioners to design and analyze order-of-addition experiments. Detailed comparisons and summary of all statistical methods in this package can be found in Tsai (2026), "Order-of-addition experiments in R using OofAExp", Journal of Quality Technology (to appear). |
| Imports: | AlgDesign, gmp, gtools, MASS, Matrix, unrepx, utils |
| NeedsCompilation: | no |
| Depends: | R (≥ 2.10) |
| RoxygenNote: | 7.3.3 |
| LazyData: | TRUE |
| Encoding: | UTF-8 |
| License: | GPL-2 |
| Packaged: | 2026-04-16 11:13:13 UTC; shin-fu |
| Author: | Shin-Fu Tsai [aut, cre] |
| Maintainer: | Shin-Fu Tsai <shinfu@ntu.edu.tw> |
| Repository: | CRAN |
| Date/Publication: | 2026-04-21 18:02:32 UTC |
Three-drug combination data
Description
This dataset contains all treatments and their corresponding responses of the three-drug combination experiment conducted by Wang, Xu and Ding (2020).
Usage
dat.3drug
Format
A numeric matrix
Details
There are 28 treatments in this order-of-addition two-level factorial experiment.
Each treatment is an order-level combination of three chemotherapeutics.
The chemotherapeutics 1 and 2 have two dose levels which are shown in level.1 and level.2,
where -1 represents the low dose level and +1 represents the high dose level.
The chemotherapeutic 3 has a constant level.
The three chemotherapeutics were added simultaneously when conducting the treatments t.7, t.14, t.21 and t.28.
Their administration orders are represented by step.1=step.2=step.3=0.
Each treatment has three independent observations which are given in y.1, y.2 and y.3.
Their average is listed in avg.
Note
All components are relabeled with positive integers according to the following relabeling scheme.
1: Paclitaxel (A).
2: Doxorubicin (B).
3: Mitoxantrone (C).
Wang, Xu and Ding (2020) used the labels in the parentheses.
References
Wang, A., Xu, H. and Ding, X. (2020). Simultaneous optimization of drug combination dose-ratio sequence with innovative design and active learning. Advanced Therapeutics, 3:1900135.
See Also
dat.3drug.adapted, dat.4drug, dat.5drug
Examples
dat.3drug
Adapted three-drug combination data
Description
This dataset contains all adapted treatments of the three-drug combination experiment conducted by Wang, Xu and Ding (2020). Related summary statistics of their corresponding responses are also provided.
Usage
dat.3drug.adapted
Format
A numeric matrix
Details
There are 6 adapted treatments in this order-of-addition experiment.
Each adapted treatment is an addition order of three chemotherapeutics.
Because the dosage effects do not seem to have a significant impact on the responses,
all observations with the same addition order in dat.3drug are merged by ignoring their dose levels such that each adapted treatment has rep=12 independent observations.
Their average and variance are listed in avg and var.
Some responses in dat.3drug were obtained by adding the three chemotherapeutics simultaneously.
They are not included in dat.3drug.adapted.
Note
All components are relabeled with positive integers according to the following relabeling scheme.
1: Paclitaxel (A).
2: Doxorubicin (B).
3: Mitoxantrone (C).
Wang, Xu and Ding (2020) used the labels in the parentheses.
References
Wang, A., Xu, H. and Ding, X. (2020). Simultaneous optimization of drug combination dose-ratio sequence with innovative design and active learning. Advanced Therapeutics, 3:1900135.
See Also
dat.3drug, dat.4drug, dat.5drug
Examples
dat.3drug.adapted
Four-drug combination data
Description
This dataset contains all treatments and their corresponding responses of the four-drug combination experiment conducted by Wang, Xu and Ding (2020).
Usage
dat.4drug
Format
A numeric matrix
Details
There are 25 treatments in this order-of-addition experiment.
Each treatment is an addition order of four chemotherapeutics.
The four chemotherapeutics were added simultaneously when conducting the treatment t.25.
Its administration order is represented by step.1=step.2=step.3=step.4=0.
Each treatment has three independent observations which are given in y.1, y.2 and y.3.
Their average is listed in avg.
Note
All components are relabeled with positive integers according to the following relabeling scheme.
1: Paclitaxel (A).
2: Doxorubicin (B).
3: Mitoxantrone (C).
4: Cisplatin (D).
Wang, Xu and Ding (2020) used the labels in the parentheses.
References
Wang, A., Xu, H. and Ding, X. (2020). Simultaneous optimization of drug combination dose-ratio sequence with innovative design and active learning. Advanced Therapeutics, 3:1900135.
See Also
Examples
dat.4drug
Four-ingredient paint viscosity data
Description
This dataset contains all treatments and their corresponding responses of the four-ingredient paint viscosity experiment conducted by Voelkel and Gallagher (2019).
Usage
dat.4paint
Format
A numeric matrix
Details
There are 24 treatments in this order-of-addition experiment.
Each treatment is an addition order of four paint ingredients and has a single replicate.
The corresponding response listed in Log.L.H is equal to \log_{10}(\code{LSV}/\code{HSV}),
where LSV is the low shear viscosity and HSV is the high shear viscosity.
Note
All components are relabeled with positive integers according to the following relabeling scheme.
1: Primary binder resin (R1).
2: Secondary binder resin (R2).
3: Flow and leveling additive (A).
4: Rheology modifier #1 (M1).
Voelkel and Gallagher (2019) used the labels in the parentheses.
References
Voelkel, J. G. (2019). Order of addition experiments: five designs and three datasets. Mendeley Data, Version 1, doi: 10.17632/8vyvrkd7tk.1.
Voelkel, J. G. and Gallagher, K. P. (2019). The design and analysis of order-of-addition experiments: An introduction and case study. Quality Engineering, 31, 627-638.
See Also
Examples
dat.4paint
Five-drug combination data
Description
This dataset contains all treatments and their corresponding responses of the five-drug combination experiment conducted by Wang, Xu and Ding (2020).
Usage
dat.5drug
Format
A numeric matrix
Details
There are 60 treatments in this order-of-addition two-level factorial experiment.
Each treatment is an order-level combination of five chemotherapeutics.
The chemotherapeutics 1 to 4 have a constant dose level.
The chemotherapeutic 5 has two dose levels which are shown in level.5,
where -1 represents the low dose level and +1 represents the dose high level.
The 60 treatments can be divided into three batches of equal size.
The batch number of each treatment is shown in batch.
Each treatment has three independent observations which are given in y.1, y.2 and y.3.
Their average is listed in avg.
Note
All components are relabeled with positive integers according to the following relabeling scheme.
1: Paclitaxel (A).
2: Doxorubicin (B).
3: Mitoxantrone (C).
4: Cisplatin (D).
5: Etoposide (E).
Wang, Xu and Ding (2020) used the labels in the parentheses.
References
Wang, A., Xu, H. and Ding, X. (2020). Simultaneous optimization of drug combination dose-ratio sequence with innovative design and active learning. Advanced Therapeutics, 3:1900135.
See Also
Examples
dat.5drug
Five-ingredient paint viscosity data
Description
This dataset contains all treatments and their corresponding responses of the five-ingredient paint viscosity experiment conducted by Voelkel and Gallagher (2019).
Usage
dat.5paint
Format
A numeric matrix
Details
There are 15 treatments in this order-of-addition experiment.
Each treatment is an addition order of five paint ingredients and has a single replicate.
The corresponding response listed in Log.L.H is equal to \log_{10}(\code{LSV}/\code{HSV}),
where LSV is the low shear viscosity and HSV is the high shear viscosity.
Note
All components are relabeled with positive integers according to the following relabeling scheme.
1: Crosslinking resin (X).
2: Primary binder resin (R1).
3: Secondary binder resin (R2).
4: Flow and leveling additive (A).
5: Rheology modifier #1 (M1).
Voelkel and Gallagher (2019) used the labels in the parentheses.
Because only the position vectors are given in the data file PPG5_15.csv in Voelkel (2019),
these position vectors are converted to treatment vectors in dat.5paint.
In particular, every logarithmic ratio in PPG5_15.csv in Voelkel (2019) was obtained by computing \log_{10}(\log_{10}\code{LSV}/\log_{10}\code{HSV}).
References
Voelkel, J. G. (2019). Order of addition experiments: five designs and three datasets. Mendeley Data, Version 1, doi: 10.17632/8vyvrkd7tk.1.
Voelkel, J. G. and Gallagher, K. P. (2019). The design and analysis of order-of-addition experiments: An introduction and case study. Quality Engineering, 31, 627-638.
See Also
Examples
dat.5paint
Six-ingredient paint viscosity data
Description
This dataset contains all treatments and their corresponding responses of the six-ingredient paint viscosity experiment conducted by Voelkel and Gallagher (2019).
Usage
dat.6paint
Format
A numeric matrix
Details
There are 24 treatments in this order-of-addition experiment.
Each treatment is an addition order of six paint ingredients and has a single replicate.
The corresponding response listed in Log.L.H is equal to \log_{10}(\code{LSV}/\code{HSV}),
where LSV is the low shear viscosity and HSV is the high shear viscosity.
Note
All components are relabeled with positive integers according to the following relabeling scheme.
1: Crosslinking resin (X).
2: Primary binder resin (R1).
3: Secondary binder resin (R2).
4: Flow and leveling additive (A).
5: Rheology modifier #2 (M2).
6: Rheology modifier #1 (M1).
Voelkel and Gallagher (2019) used the labels in the parentheses.
References
Voelkel, J. G. (2019). Order of addition experiments: five designs and three datasets. Mendeley Data, Version 1, doi: 10.17632/8vyvrkd7tk.1.
Voelkel, J. G. and Gallagher, K. P. (2019). The design and analysis of order-of-addition experiments: An introduction and case study. Quality Engineering, 31, 627-638.
See Also
Examples
dat.6paint
Design catalogue for order-of-addition experiments
Description
This function provides optimal experimental designs for order-of-addition experiments.
Usage
des.cat(m, n, class, rand = TRUE)
Arguments
m |
a positive integer indicating the number of components. |
n |
a positive integer indicating the number of treatments. |
class |
a character indicating the class of optimal order-of-addition designs.
Available options include order-of-addition orthogonal arrays of strength two (" |
rand |
a logical indicating whether or not the design matrix should be row-randomized.
The default value is |
Value
The output is a list consisting of the following components.
dem |
an |
ref |
a character indicating the reference of this optimal design. |
Note
The des.cat function provides optimal order-of-addition design for \code{m}\le\code{9} and \code{n}\le\code{200}.
They are taken from the papers listed below.
In particular, the order-of-addition orthogonal arrays of strength two for \code{m}=\code{7}
and \code{n}=\code{60},\code{108},\code{132},\code{156},\code{180} are generated by computer search when developing this package.
References
Schoen, E.D. and Mee, R.W. (2023). Order-of-addition orthogonal arrays to study the effect of treatment ordering. Annals of Statistics, 51, 1877-1894.
Tsai, S.-F. (2022). Generating optimal order-of-addition designs with flexible run sizes. Journal of Statistical Planning and Inference, 218, 147-163.
Tsai, S.-F. (2023). Dual-orthogonal arrays for order-of-addition two-level factorial experiments. Technometrics, 65, 388-395.
Tsai, S.-F. (2025). Characterizing and comparing order-of-addition orthogonal arrays. Statistica Sinica, to appear.
Voelkel, J.G. (2019). The design of order-of-addition experiments. Journal of Quality Technology, 51, 230-241.
Yang, J.-F., Sun, F. and Xu, H. (2021). A component-position model, analysis and design for order-of-addition experiments. Technometrics, 63, 212-224.
Zhao, Y., Li, Z. and Zhao, S. (2021). A new method of finding component orthogonal arrays for order-of-addition experiments. Metrika, 84, 805-824.
Zhao, Y., Lin, D.K.-J. and Liu, M.-Q. (2022). Optimal designs for order-of-addition experiments. Computational Statistics and Data Analysis, 165:107320.
Examples
### OofA-OA(4,12,2) ###
des.cat(4,12,"OofA-OA")
### COA(5,20,2) ###
des.cat(5,20,"COA")
Design generator using pairwise order factors and Federov's exchange algorithm
Description
This function generates order-of-addition designs using pairwise order factors and optFederov function in the AlgDesign package.
Usage
des.pwof.Federov(m, n, rep = 1, aoc = "D")
Arguments
m |
a positive integer indicating the number of components. |
n |
a positive integer indicating the number of treatments. |
rep |
a positive integer indicating the number of repeats.
The default value is |
aoc |
a character indicating the alphabetic-optimality criterion to be used.
Available options include the D-optimality criterion (" |
Value
The output is a list consisting of the following components.
dem |
an |
ree |
relative efficiency of the output design and the theoretical optimum provided by Peng et al. (2019). |
rid |
row indices of the output design corresponding to the full design generated by |
References
Federov, V. V. (1972). Theory of optimal experiments. Academic Press, New York, NY, United States.
Peng, J., Mukerjee, R. and Lin, D. K.-J. (2019). Design of order-of-addition experiments. Biometrika, 106, 683-694.
Wheeler, R. E. (2025). AlgDesign: Algorithmic experimental design. R package 1.2.1 https://cran.r-project.org/web/packages/AlgDesign/index.html.
See Also
Examples
### m=4 and n=12 ###
des.pwof.Federov(4,12)
Design generator using pairwise order factors and Latin squares
Description
This function generates order-of-addition designs by using pairwise order factors and juxtaposing isotopic Latin squares.
This function is an R implementation of Algorithm 1 of Tsai (2022).
Usage
des.pwof.Latinoa(m, nl, ni = 1, nu = 1000)
Arguments
m |
a positive integer indicating the number of components. |
nl |
a positive integer indicating the number of isotopic Latin squares. |
ni |
a positive integer indicating the number of initials.
The default value is |
nu |
a positive integer indicating the number of updates.
The default value is |
Value
The output is a list consisting of the following components.
dem |
an |
rde |
relative D-efficiency of the output design and the theoretical optimum provided by Peng et al. (2019). |
rid |
row indices of the column permutation sequences corresponding to the candidate set generated by |
Note
A Fortran implementation of Algorithm 1 of Tsai (2022) called Latinoa can be downloaded from his personal website (https://www.shinfu.idv.tw).
References
Peng, J., Mukerjee, R. and Lin, D. K.-J. (2019). Design of order-of-addition experiments. Biometrika, 106, 683-694.
Tsai, S.-F. (2022). Generating optimal order-of-addition designs with flexible run sizes. Journal of Statistical Planning and inference, 218, 147-163.
See Also
Examples
### m=5 and n=60 ###
des.pwof.Latinoa(5,12,1,50)
Enumerator of Hamming distance distributions
Description
This function enumerates the Hamming distance distribution of all m-element permutations, where the Hamming distance between two permutations is defined based on their pairwise order vectors.
Usage
enu.hdd(m)
Arguments
m |
a positive integer indicating the number of elements. |
Value
The output is an integer vector of length \code{m}(\code{m}-\code{1})/\code{2}+\code{1}.
Note
The output consists of the integer sequence labeled A008302 on the Online Encyclopedia of Integer Sequences (https://oeis.org/A008302).
The output consists of many extremely large integers when m is moderately large.
Therefore, when m is larger than or equal to 20,
the as.bigz function in the gmp package is called for such big integer calculations,
with the result that the computational speed may be slow.
References
Tsai, S.-F. (2025). Characterizing and comparing order-of-addition orthogonal arrays. Statistica Sinica, to appear.
See Also
Examples
### OEIS A008302 ###
enu.hdd(3)
Enumerator of inversion numbers
Description
This function enumerates inversion numbers of all m-element permutations in lexicographic order.
Usage
enu.inn(m)
Arguments
m |
a positive integer indicating the number of elements. |
Value
The output is an integer vector of length \code{m}!.
Note
The output consists of the integer sequence labeled A034968 on the Online Encyclopedia of Integer Sequences (https://oeis.org/A034968).
The frequency distribution of all integers in the output is identical to the Hamming distance distribution yielded by the enu.hdd function.
In other words, the frequency distribution consists of the integer sequence labeled A008302 on the Online Encyclopedia of Integer Sequences (https://oeis.org/A008302).
References
Tsai, S.-F. (2025). Characterizing and comparing order-of-addition orthogonal arrays. Statistica Sinica, to appear.
See Also
Examples
### OEIS A034968 ###
enu.inn(3)
### OEIS A008302 ###
table(enu.inn(3))
Generator of component positions
Description
This function generates component positions.
Usage
gen.cp(t)
Arguments
t |
a treatment vector consisting of the |
Value
The output is an \code{1}\times\code{m} position vector or an \code{n}\times\code{m} position matrix.
Note
This function can also be used to generate a treatment vector or a treatment matrix when the input is a position vector or a position matrix.
References
Stokes and Xu (2022). A position-based approach for design and analysis of order-of-addition experiments. Statistica Sinica, 32, 1467-1488.
Yang, J.-F., Sun, F. and Xu, H. (2021). A component-position model, analysis and design for order-of-addition experiments. Technometrics, 63, 212-224.
See Also
Examples
gen.cp(c(1,4,2,3))
gen.cp(gen.cp(c(1,4,2,3)))
Generator of pseudo factors
Description
This function generates pseudo factors.
Usage
gen.pf(t, method)
Arguments
t |
a treatment vector consisting of the |
method |
a character indicating the pseudo factors to be used.
Available options include pairwise order factors (" |
Value
The output is a numeric vector or a numeric matrix.
References
Stokes and Xu (2022). A position-based approach for design and analysis of order-of-addition experiments. Statistica Sinica, 32, 1467-1488.
Van Nostrand, R. C. (1995). Design of experiments where the order of addition is important. ASA Proceedings of the Section on Physical and Engineering Sciences, 155-160. American Statistical Association, Alexandria, VA, United States.
Voelkel, J. G. (2019). The design of order-of-addition experiments. Journal of Quality Technology, 51, 230-241.
Yang, J.-F., Sun, F. and Xu, H. (2021). A component-position model, analysis and design for order-of-addition experiments. Technometrics, 63, 212-224.
See Also
Examples
### treatment 1423 ###
gen.pf(c(1,4,2,3),"pwof")
gen.pf(c(1,4,2,3),"lcpf")
gen.pf(c(1,4,2,3),"qcpf")
Generator of quasi-foldover vectors
Description
This function generates quasi-foldover vectors and related index sets with respect to a user-specified requirement set for a given order-of-addition design.
Usage
gen.qf(t, req)
Arguments
t |
an |
req |
a character vector indicating the requirement set in which " |
Value
The output is a list consisting of the following components.
v |
all possible |
pst |
index pairs of positive quasi foldover vectors. |
nst |
index pairs of negative quasi foldover vectors. |
ist |
index sets of treatments. |
References
Tsai, S.-F. (2023). Analyzing dispersion effects from order-of-addition experiments. Journal of Quality Technology, 55, 271-288.
Tsai, S.-F. and He, S.-S. (2024). Testing multiple dispersion effects from unreplicated order-of-addition experiments. Australian and New Zealand Journal of Statistics, 66, 228-248.
See Also
Examples
### Example 2 of Tsai and He (2024) ###
gen.qf(dat.6paint[,1:6],c("z.1.2","z.4.6"))
Standard t-tests for component-position location effects
Description
This function implements standard t-tests for identifying active linear and quadratic component-position location effects from order-of-addition experiments.
Usage
test.cpf.lo(t, y, cpf)
Arguments
t |
an |
y |
a response vector of length |
cpf |
a character indicating the component position factors to be used.
Available options includes the linear component-position factors (" |
Value
The output is a numeric matrix consisting of all least squares estimates, t-statistics and their p-values.
Note
Based on the hierarchy-of-effects assumption,
both linear and quadratic component-position effects will be tested when the cpf argument is set to "qcpf".
References
Stokes and Xu (2022). A position-based approach for design and analysis of order-of-addition experiments. Statistica Sinica, 32, 1467-1488.
See Also
Examples
### linear component-position model in (3.6) of Stokes and Xu (2022) ###
library(gtools)
t<-permutations(n=4,r=4,v=1:4)
y<-c(41.1,37.5,55.4,56.5,43.3,51.2,46.1,27.8,39.5,46.4,34.4,39.4,
53.5,51.2,50.8,51.4,52.9,53.4,39.1,46.4,37.2,42.1,46.8,41.8)
test.cpf.lo(t,y,"lcpf")
Frequentist test for identifying active pairwise order dispersion effects from replicated order-of-addition experiments
Description
This function implements frequentist (approximate) z-tests for identifying active pairwise order dispersion effects from replicated order-of-addition experiments.
Usage
test.pwof.dp.r(t, v, r)
Arguments
t |
an |
v |
a vector of length |
r |
a positive integer indicating the number of replicates. |
Value
The output is a numeric matrix consisting of all least squares estimates, z-statistics and their p-values.
References
Bartlett, M. S. and Kendall, D. G. (1946). The statistical analysis of variance-heterogeneity and the logarithmic transformation. Supplement to the Journal of the Royal Statistical Society, 8, 128-138.
Tsai, S.-F. (2023). Analyzing dispersion effects from replicated order-of-addition experiments. Journal of Quality Technology, 55, 271-288.
See Also
Examples
### the first three p-values in Table 4 of Tsai (2023) ###
test.pwof.dp.r(dat.3drug.adapted[,1:3],dat.3drug.adapted[,6],12)
Fiducial test for identifying active pairwise order dispersion effects from unreplicated order-of-addition experiments
Description
This function implements fiducial tests for identifying active pairwise order dispersion effects from unreplicated order-of-addition experiments.
Usage
test.pwof.dp.u(t, y, ale, req, nmc = 5000)
Arguments
t |
an |
y |
a response vector of length |
ale |
a character vector indicating the active location effects in which " |
req |
a character vector indicating the requirement set in which " |
nmc |
a positive integer indicating the number of Monte-Carlo samples to be generated.
The default value is |
Value
The output is a numeric vector consisting of all approximate p-values.
Note
Before implementing the test.pwof.dp.u function,
as noted in Tsai and He (2024),
all active location effects must be listed in the ale argument.
References
Tsai, S.-F. and He, S.-S. (2024). Testing multiple dispersion effects from unreplicated order-of-addition experiments. Australian and New Zealand Journal of Statistics, 66, 228-248.
See Also
Examples
### analysis results in Section 5 of Tsai and He (2024) ###
l<-c("z.1.2","z.2.4","z.2.5","z.2.6","z.4.6")
d<-c("z.1.2","z.4.6")
test.pwof.dp.u(dat.6paint[,1:6],dat.6paint[,9],l,d)
Standard and pseudo t-tests for pairwise order location effects
Description
This function implements standard and pseudo t-tests for identifying active pairwise order location effects from order-of-addition experiments.
Usage
test.pwof.lo(t, y, nmc = 5000, estimator = "Lenth")
Arguments
t |
an |
y |
a response vector of length |
nmc |
a positive integer indicating the number of Monte-Carlo samples to be generated.
The default value is |
estimator |
a character indicating the pseudo standard error to be used.
Because the |
Value
The output is a numeric matrix consisting of all least squares estimates and their p-values,
where the p-values listed in p.value.t, p.value.u and p.value.c are computed based on the standard t-statistics, U and C methods.
Note
The standard t-test will not be implemented when \code{n}=\code{m}(\code{m}-\code{1})/\code{2}+\code{1}.
References
Daniel, C. (1959). Use of half-normal plots in interpreting factorial two-level experiments. Technometrics, 1, 311-341.
Dong, F. (1993). On the identification of active contrasts in unreplicated fractional factorials. Statistica Sinica, 3, 209-217.
Edwards, D. J. and Mee, R. W. (2008). Empirically determined p-values for Lenth t-statistics. Journal of Quality Technology, 40, 368-380.
Juan, J. and Pena, D. (1992). A simple method to identify significant effects in unreplicated two-level factorial designs. Communications in Statistics-Theory and Methods, 21, 1383-1403.
Lenth, R. V. (1989). Quick and easy analysis of unreplicated factorials. Technometrics, 31, 469-473.
Lenth, R. V. (2022). unrepx: Analysis and graphics for unreplicated experiments. R package version 1.0.2. https://cran.r-project.org/web/packages/unrepx/index.html.
Tsai, S.-F. (2026). Order-of-addition experiments in R using OofAExp. Journal of Quality Technology, to appear.
Zahn, D. A. (1975). Modifications of and revised critical values for the half-normal plot. Technometrics, 17, 189-200.
See Also
Examples
### example 4 in Tsai (2026) ###
test.pwof.lo(dat.4paint[,1:4],dat.4paint[,7],1000)