Builds a squared-association network, detects indicator communities, and estimates one centrality-weighted latent variable per retained community.
ndr(r, covar = FALSE, cor_method = 1, cor_type = 1, min_R = 0,
min_comm = 2, Gamma = 1, null_model_type = 4, mod_mode = 6,
min_evalue = 0, min_communality = 0, com_communalities = 0,
use_rotation = FALSE, rotation = "oblimin", weight = NULL,
seed = NULL, parallel = FALSE, cores = 1L, sparsecalc = FALSE,
membership = NULL,
centrality = c("eigenvector", "authority", "hub", "pagerank"),
standardized = TRUE, P_mat = NULL, test = FALSE,
p_adjust = "BH", alpha = NULL, bootstrap = FALSE,
n_boot = 200L, conf = 0.95)An object of class nda. Important elements include scores, loadings, communality, uniqueness, membership, EVCs, R, correlation, modularity, reconstruction, and stats. The stats list contains indicator p-values, optional bootstrap intervals, retained and dropped indicators, community sizes, and null-model metadata. Scores are unavailable for association-matrix input, but reconstruction-consistent loadings, communalities, and a loading-based reconstructed association matrix are returned.
Numeric row-level data, or a square association matrix when covar = TRUE. Sparse Matrix inputs are accepted.
Use r as an association matrix instead of estimating associations from rows.
Association method. Numeric values 1--6 retain compatibility; textual values are "pearson", "spearman", "kendall", "distance", "gaussian_rank", and "biweight". Gaussian-rank correlation is a fast monotone robust alternative; biweight correlation limits outlier influence.
Association type: "full", "partial", or "semipartial"; 1--3 are accepted aliases.
Minimum squared association retained as an edge.
Minimum preferred community size. A singleton is retained when it is the only feasible result.
Positive resolution multiplier used by community detection and null-model subtraction.
Null model: 1 configuration-model expectation, 2 mean positive similarity, 3 min_R, or 4 no matrix modification (default).
Community method: Louvain, fast greedy, leading eigenvector, Infomap, Walktrap, or Leiden; either names or values 1--6.
Minimum selected centrality weight for periphery filtering.
Minimum indicator communality.
Minimum separation between the two largest squared loadings for common-indicator filtering. Zero disables this filter.
Rotate a multi-factor solution.
Rotation understood by psych::principal.
One finite observation-score weight per indicator.
Optional random seed.
Use multicore calculation for pairwise distance associations and bootstrap replicates where supported.
Number of requested cores.
Store and process the thresholded similarity network as a sparse matrix.
Optional supplied community membership, one value per indicator. Zero excludes an indicator.
Latent-variable weighting: eigenvector, authority, hub, or PageRank centrality.
Standardize input indicators using training means and standard deviations before weighting.
Optional finite expected-edge matrix. When supplied it overrides null_model_type.
Calculate association p-values.
Method passed to p.adjust for false-discovery-rate control.
Optional adjusted-p threshold; nonsignificant associations are set to zero.
Bootstrap loading intervals from row-level data.
Number of bootstrap replicates.
Bootstrap confidence level.
The method follows three stages: construct a squared-association graph, detect network communities, and form standardized centrality-weighted latent scores. Partial and semipartial networks can be asymmetric. Null-model types 1--3 operate on nonnegative residual similarities; type 4 leaves the similarity matrix unchanged.
Kosztyan, Z. T., Kurbucz, M. T., and Katona, A. I. (2022). Network-based dimensionality reduction of high-dimensional, low-sample-size datasets. Knowledge-Based Systems, 109180. tools:::Rd_expr_doi("10.1016/j.knosys.2022.109180").
Kosztyan, Z. T., Katona, A. I., Kurbucz, M. T., and Lantos, Z. (2024). Generalized network-based dimensionality analysis. Expert Systems with Applications, 238, 121779. tools:::Rd_expr_doi("10.1016/j.eswa.2023.121779").
fit <- ndr(swiss, cor_method = "spearman", centrality = "pagerank")
summary(fit)
scores <- predict(fit, swiss[1:3, ])
association <- cor(swiss)
fit_matrix <- ndr(association, covar = TRUE, membership = c(1, 1, 1, 2, 2, 2))
fit_matrix$loadings
if (FALSE) {
fit_boot <- ndr(swiss, cor_method = "distance", test = TRUE,
bootstrap = TRUE, n_boot = 500, parallel = TRUE, cores = 4)
}
Run the code above in your browser using DataLab