| Title: | Order-of-Addition Experiments |
|---|---|
| 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). |
| Authors: | Shin-Fu Tsai [aut, cre] |
| Maintainer: | Shin-Fu Tsai <[email protected]> |
| License: | GPL-2 |
| Version: | 0.1.0 |
| Built: | 2026-05-22 18:54:43 UTC |
| Source: | https://github.com/cran/OofAExp |
This dataset contains all treatments and their corresponding responses of the three-drug combination experiment conducted by Wang, Xu and Ding (2020).
dat.3drugdat.3drug
A numeric matrix
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.
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.
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.
dat.3drug.adapted, dat.4drug, dat.5drug
dat.3drugdat.3drug
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.
dat.3drug.adapteddat.3drug.adapted
A numeric matrix
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.
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.
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.
dat.3drug, dat.4drug, dat.5drug
dat.3drug.adapteddat.3drug.adapted
This dataset contains all treatments and their corresponding responses of the four-drug combination experiment conducted by Wang, Xu and Ding (2020).
dat.4drugdat.4drug
A numeric matrix
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.
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.
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.
dat.4drugdat.4drug
This dataset contains all treatments and their corresponding responses of the four-ingredient paint viscosity experiment conducted by Voelkel and Gallagher (2019).
dat.4paintdat.4paint
A numeric matrix
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 ,
where LSV is the low shear viscosity and HSV is the high shear viscosity.
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.
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.
dat.4paintdat.4paint
This dataset contains all treatments and their corresponding responses of the five-drug combination experiment conducted by Wang, Xu and Ding (2020).
dat.5drugdat.5drug
A numeric matrix
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.
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.
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.
dat.5drugdat.5drug
This dataset contains all treatments and their corresponding responses of the five-ingredient paint viscosity experiment conducted by Voelkel and Gallagher (2019).
dat.5paintdat.5paint
A numeric matrix
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 ,
where LSV is the low shear viscosity and HSV is the high shear viscosity.
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 .
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.
dat.5paintdat.5paint
This dataset contains all treatments and their corresponding responses of the six-ingredient paint viscosity experiment conducted by Voelkel and Gallagher (2019).
dat.6paintdat.6paint
A numeric matrix
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 ,
where LSV is the low shear viscosity and HSV is the high shear viscosity.
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.
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.
dat.6paintdat.6paint
This function provides optimal experimental designs for order-of-addition experiments.
des.cat(m, n, class, rand = TRUE)des.cat(m, n, class, rand = TRUE)
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 |
The output is a list consisting of the following components.
dem |
an |
ref |
a character indicating the reference of this optimal design. |
The des.cat function provides optimal order-of-addition design for and .
They are taken from the papers listed below.
In particular, the order-of-addition orthogonal arrays of strength two for
and are generated by computer search when developing this package.
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.
### OofA-OA(4,12,2) ### des.cat(4,12,"OofA-OA") ### COA(5,20,2) ### des.cat(5,20,"COA")### OofA-OA(4,12,2) ### des.cat(4,12,"OofA-OA") ### COA(5,20,2) ### des.cat(5,20,"COA")
This function generates order-of-addition designs using pairwise order factors and optFederov function in the AlgDesign package.
des.pwof.Federov(m, n, rep = 1, aoc = "D")des.pwof.Federov(m, n, rep = 1, aoc = "D")
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 (" |
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 |
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.
### m=4 and n=12 ### des.pwof.Federov(4,12)### m=4 and n=12 ### des.pwof.Federov(4,12)
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).
des.pwof.Latinoa(m, nl, ni = 1, nu = 1000)des.pwof.Latinoa(m, nl, ni = 1, nu = 1000)
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 |
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 |
A Fortran implementation of Algorithm 1 of Tsai (2022) called Latinoa can be downloaded from his personal website (https://www.shinfu.idv.tw).
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.
### m=5 and n=60 ### des.pwof.Latinoa(5,12,1,50)### m=5 and n=60 ### des.pwof.Latinoa(5,12,1,50)
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.
enu.hdd(m)enu.hdd(m)
m |
a positive integer indicating the number of elements. |
The output is an integer vector of length .
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.
Tsai, S.-F. (2025). Characterizing and comparing order-of-addition orthogonal arrays. Statistica Sinica, to appear.
### OEIS A008302 ### enu.hdd(3)### OEIS A008302 ### enu.hdd(3)
This function enumerates inversion numbers of all m-element permutations in lexicographic order.
enu.inn(m)enu.inn(m)
m |
a positive integer indicating the number of elements. |
The output is an integer vector of length .
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).
Tsai, S.-F. (2025). Characterizing and comparing order-of-addition orthogonal arrays. Statistica Sinica, to appear.
### OEIS A034968 ### enu.inn(3) ### OEIS A008302 ### table(enu.inn(3))### OEIS A034968 ### enu.inn(3) ### OEIS A008302 ### table(enu.inn(3))
This function generates component positions.
gen.cp(t)gen.cp(t)
t |
a treatment vector consisting of the |
The output is an position vector or an position matrix.
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.
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.
gen.cp(c(1,4,2,3)) gen.cp(gen.cp(c(1,4,2,3)))gen.cp(c(1,4,2,3)) gen.cp(gen.cp(c(1,4,2,3)))
This function generates pseudo factors.
gen.pf(t, method)gen.pf(t, method)
t |
a treatment vector consisting of the |
method |
a character indicating the pseudo factors to be used.
Available options include pairwise order factors (" |
The output is a numeric vector or a numeric matrix.
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.
### 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")### 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")
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.
gen.qf(t, req)gen.qf(t, req)
t |
an |
req |
a character vector indicating the requirement set in which " |
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. |
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.
### Example 2 of Tsai and He (2024) ### gen.qf(dat.6paint[,1:6],c("z.1.2","z.4.6"))### Example 2 of Tsai and He (2024) ### gen.qf(dat.6paint[,1:6],c("z.1.2","z.4.6"))
This function implements standard t-tests for identifying active linear and quadratic component-position location effects from order-of-addition experiments.
test.cpf.lo(t, y, cpf)test.cpf.lo(t, y, cpf)
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 (" |
The output is a numeric matrix consisting of all least squares estimates, t-statistics and their p-values.
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".
Stokes and Xu (2022). A position-based approach for design and analysis of order-of-addition experiments. Statistica Sinica, 32, 1467-1488.
### 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")### 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")
This function implements frequentist (approximate) z-tests for identifying active pairwise order dispersion effects from replicated order-of-addition experiments.
test.pwof.dp.r(t, v, r)test.pwof.dp.r(t, v, r)
t |
an |
v |
a vector of length |
r |
a positive integer indicating the number of replicates. |
The output is a numeric matrix consisting of all least squares estimates, z-statistics and their p-values.
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.
### 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)### 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)
This function implements fiducial tests for identifying active pairwise order dispersion effects from unreplicated order-of-addition experiments.
test.pwof.dp.u(t, y, ale, req, nmc = 5000)test.pwof.dp.u(t, y, ale, req, nmc = 5000)
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 |
The output is a numeric vector consisting of all approximate p-values.
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.
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.
### 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)### 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)
This function implements standard and pseudo t-tests for identifying active pairwise order location effects from order-of-addition experiments.
test.pwof.lo(t, y, nmc = 5000, estimator = "Lenth")test.pwof.lo(t, y, nmc = 5000, estimator = "Lenth")
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 |
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.
The standard t-test will not be implemented when .
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.
### example 4 in Tsai (2026) ### test.pwof.lo(dat.4paint[,1:4],dat.4paint[,7],1000)### example 4 in Tsai (2026) ### test.pwof.lo(dat.4paint[,1:4],dat.4paint[,7],1000)