| Title: | Fractional Factorial Designs with Alias and Trend-Free Analysis |
|---|---|
| Description: | Constructs mixed-level and regular fractional factorial designs using coordinate-exchange optimization and automatic generator search. Design quality is evaluated with J2 and balance (H-hat) criteria, alias structures are computed via correlation-based chaining, and deterministic trend-free run orders can be produced following Coster (1993) <doi:10.1214/aos/1176349410>. Mixed-level design construction follows the NONBPA approach of Pantoja-Pacheco et al. (2021) <doi:10.3390/math9131455>. Regular fraction identification follows Guo, Simpson and Pignatiello (2007) <doi:10.1080/00224065.2007.11917691>. Alias structure computation follows Rios-Lira et al.(2021) <doi:10.3390/math9233053>. |
| Authors: | Sukanta Dash [aut, cre] |
| Maintainer: | Sukanta Dash <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0 |
| Built: | 2026-05-12 06:50:10 UTC |
| Source: | https://github.com/cran/MixFrac |
generate_ff() constructs mixed-level fractional factorial designs or,
when all factors share the same number of levels , automatically
searches for a regular fractional factorial using generator
relations.
#' The function performs:
Part 1: Design construction (regular or mixed-level)
Part 2: Design diagnostics: balance (Hhat), J2, GBM, alias chains, and strong confounding summary
Part 3 (optional): Deterministic trend-free run order based on Coster (1993)
Output printing can be controlled via the parts argument.
generate_ff( levels_spec, n_runs, max_iter = 100, a = 1, b = 1, max_int_order = 3, alias_min_abs_corr = 0.9, tf = FALSE, parts = c(1, 2, 3), verbose = TRUE )generate_ff( levels_spec, n_runs, max_iter = 100, a = 1, b = 1, max_int_order = 3, alias_min_abs_corr = 0.9, tf = FALSE, parts = c(1, 2, 3), verbose = TRUE )
levels_spec |
A numeric vector such as |
n_runs |
Number of experimental runs required. |
max_iter |
Maximum number of iterations for coordinate exchange or
unique-subset improvement (default: |
a |
Weight for the J2 near-orthogonality criterion. |
b |
Weight for the Hhat balance criterion. |
max_int_order |
Highest-order interaction used when building model
matrices for alias calculations. Default is |
alias_min_abs_corr |
Minimum absolute correlation required for a pair of model terms to appear in the strong confounding summary table. |
tf |
Logical. When |
parts |
Integer vector selecting which sections to print:
To print all: |
verbose |
Logical. When |
When all factors have the same number of levels , and when
, the function attempts to find a regular
fraction via a heuristic generator search inspired by Guo et al.
(2007). The objective minimized is:
The objective function minimized is
Z = a * J2 + b * Hhat.
If no acceptable generator set is found, the algorithm reverts to a mixed-level design strategy.
Mixed-level designs are constructed using the Pantoja-Pacheco et al. (2021)
NONBPA skeleton for nonmultiple levels, followed by a Guo-style coordinate
exchange improvement on the -criterion.
Alias relationships are computed from the correlation matrix of the model matrix (main effects + interactions). Chains are built by selecting the pair of terms with the highest absolute correlation, choosing the lower-order term as the chain leader.
When tf = TRUE, a deterministic pairwise-swap algorithm produces a run order
orthogonal to polynomial time trends (linear by default).
A list containing:
design_int -> integer-coded design
design_labels -> decoded factor levels
level_maps -> internal mapping of coded levels
Hhat -> balance measure
J2hat -> near-orthogonality measure
GBM -> general balance metric
gbm_resolution -> smallest order with imbalance
model_matrix -> model matrix with interactions
corr_matrix -> correlation matrix
alias_chains -> alias chain structure
alias_summary -> strong confounding pairs
trend_free_result -> (if tf = TRUE) run order, reordered design,
and final trend objective
Returned invisibly unless assigned.
Guo, Y., Simpson, J. R., & Pignatiello, J. J. (2007). Construction of Efficient Mixed-Level Fractional Factorial Designs. Journal of Quality Technology, 39(3), 241-257. doi:10.1080/00224065.2007.11917691
Pantoja-Pacheco, Y. V. et al. (2021). One Note for Fractionation and Increase for Mixed-Level Designs When the Levels Are Not Multiple. Mathematics, 9(13), 1455. doi:10.3390/math9131455
Rios-Lira, A. J. et al. (2021). Alias Structures and Sequential Experimentation for Mixed-Level Designs. Mathematics, 9(23), 3053. doi:10.3390/math9233053
Coster, D. C. (1993). Trend-Free Run Orders of Mixed-Level Fractional Factorial Designs. Annals of Statistics, 21(4), 2072-2086. doi:10.1214/aos/1176349410
# Mixed-level design (2 x 3 x 4), 12 runs, all parts printed generate_ff(c(2,3,4), 12, tf = TRUE) # Only Part 1 (design) generate_ff(c(2,3,4), 12, parts = 1, tf = FALSE) # Parts 1 and 2 only generate_ff(c(2,3,4), 12, parts = c(1,2), tf = FALSE) # Only Part 3 (trend-free run order) generate_ff(c(2,3,4), 12, parts = 3, tf = TRUE)# Mixed-level design (2 x 3 x 4), 12 runs, all parts printed generate_ff(c(2,3,4), 12, tf = TRUE) # Only Part 1 (design) generate_ff(c(2,3,4), 12, parts = 1, tf = FALSE) # Parts 1 and 2 only generate_ff(c(2,3,4), 12, parts = c(1,2), tf = FALSE) # Only Part 3 (trend-free run order) generate_ff(c(2,3,4), 12, parts = 3, tf = TRUE)