| Title: | Grouped Latin Hypercube Designs with Controlled Correlations |
|---|---|
| Description: | We provide a method of constructing grouped Latin hypercube designs by controlling correlations. Details of the algorithm can be found in Wenlong Li, Jian-Feng Yang and Peter Chien (2026). Grouped Latin hypercube designs with controlled correlations. Technometrics, published online. Important function in this package is "GLHD_CC". |
| Authors: | Wenlong Li [aut, cre], Jian-Feng Yang [aut], Peter Chien [aut] |
| Maintainer: | Wenlong Li <[email protected]> |
| License: | LGPL (>= 3) |
| Version: | 1.1-1 |
| Built: | 2026-10-09 10:12:19 UTC |
| Source: | https://github.com/cran/GLHD |
Computes the root mean square (RMS) correlation for a given design matrix, decomposed into three components: the overall (whole) RMS correlation across all variable pairs, the within-group RMS correlation among variables sharing the same group, and the between-group RMS correlation across variables belonging to different groups.
compute_rms(D, groups)compute_rms(D, groups)
D |
A numeric matrix representing the design, where columns correspond to variables and rows to observations. |
groups |
A list of integer vectors, each specifying the column indices
belonging to one group. Typically created via |
A named list with three components:
WholeRMS correlation computed over all pairs of variables.
WithinRMS correlation computed over pairs within the same group.
Returns 0 if every group contains only a single variable.
BetweenRMS correlation computed over pairs from different groups.
Returns 0 if only one group is provided.
library(GLHD) p <- 15 group_sizes <- c(4, 5, 6) groups <- create_groups(p, group_sizes) D <- matrix(rnorm(p * 30), nrow = 30, ncol = p) compute_rms(D, groups)library(GLHD) p <- 15 group_sizes <- c(4, 5, 6) groups <- create_groups(p, group_sizes) D <- matrix(rnorm(p * 30), nrow = 30, ncol = p) compute_rms(D, groups)
Partitions the column indices 1:p into consecutive groups according
to group_sizes.
create_groups(p, group_sizes)create_groups(p, group_sizes)
p |
Total number of columns; must equal |
group_sizes |
Integer vector of group sizes |
A list of length length(group_sizes), where the i-th element
is an integer vector of column indices for group i.
create_groups(15, c(4, 5, 6))create_groups(15, c(4, 5, 6))
Constructs a Grouped Latin Hypercube Design GLHD_CC(n, p, (u1, ..., ug)), which is an n x p Latin hypercube design whose p = u1 + ... + ug columns are partitioned into g disjoint groups of sizes u1, ..., ug. The algorithm alternates between between-group and within-group correlation control steps.
GLHD_CC(n, p, group_sizes, seed = 123, n_between = 1, n_within = 9)GLHD_CC(n, p, group_sizes, seed = 123, n_between = 1, n_within = 9)
n |
A positive integer specifying the number of runs. |
p |
A positive integer specifying the total number of factors,
equal to |
group_sizes |
An integer vector |
seed |
An integer random seed for reproducibility. Default is
|
n_between |
Number of between-group correlation control iterations.
Default is |
n_within |
Number of within-group correlation control iterations.
Default is |
An n x p integer matrix whose columns form a Latin hypercube design with reduced within-group and between-group correlations.
library(GLHD) n <- 20 p <- 15 group_sizes <- c(4, 5, 6) D <- GLHD_CC(n, p, group_sizes) Dlibrary(GLHD) n <- 20 p <- 15 group_sizes <- c(4, 5, 6) D <- GLHD_CC(n, p, group_sizes) D