Skip to contents

Computes per-dimension parametric and non-parametric statistics for two groups of ENA unit points. Equivalent to group.stats() in rENA-api, moved to the C++ layer so all language bindings share a single implementation.

Usage

group_stats(g1, g2)

Arguments

g1

Numeric matrix (n1 × n_dims) — unit points for group 1

g2

Numeric matrix (n2 × n_dims) — unit points for group 2

Value

Named list with N, parametric, and nonparametric sub-lists, matching the structure of rENA-api's group.stats().

Details

Parametric (Welch two-sample t-test):

  • t — Welch t-statistics

  • parameter— Welch–Satterthwaite degrees of freedom

  • pvalue — two-tailed p-values

  • effect — Cohen's d (pooled-SD: (μ1−μ2)/pooled_sd)

  • mean — 2×n_dims matrix, row 1 = group1, row 2 = group2

  • std.dev — 2×n_dims matrix of sample standard deviations

Non-parametric (Wilcoxon rank-sum):

  • U — rank-sum U for group 1 (= R's wilcox.test W)

  • pvalue — two-tailed p-values (normal approx, tie + continuity correction)

  • effect — rank-biserial: 1 − 2·U / (n1·n2)

  • median — 2×n_dims matrix of medians

Entries are NA when a statistic is undefined (e.g. n < 2 for parametric tests).