libqe 0.2.6-dev.9001
QE C++ library
Loading...
Searching...
No Matches
qe::GroupStats Struct Reference

Per-dimension statistics from a two-group comparison. More...

#include <stats.hpp>

Public Attributes

int n1
 Sample size of group 1.
 
int n2
 Sample size of group 2.
 
arma::vec t
 Welch two-sample t-statistics.
 
arma::vec df
 Welch–Satterthwaite degrees of freedom.
 
arma::vec pvalue_t
 Two-tailed p-values from the Welch t-test.
 
arma::vec cohens_d
 Cohen's d (pooled-SD formula, group1 − group2).
 
arma::mat means
 2 × n_dims: means; row 0 = group1, row 1 = group2.
 
arma::mat sds
 2 × n_dims: sample standard deviations.
 
arma::vec U
 Wilcoxon rank-sum U for group 1 (= R's W statistic).
 
arma::vec pvalue_u
 Two-tailed p-values (normal approx, tie + continuity correction).
 
arma::vec effect_r
 Rank-biserial effect: 1 − 2·U / (n1·n2).
 
arma::mat medians
 2 × n_dims: medians; row 0 = group1, row 1 = group2.
 

Detailed Description

Per-dimension statistics from a two-group comparison.

Matches the output of rENA-api's group.stats():

  • Parametric (Welch two-sample t-test): t, df, pvalue_t, cohens_d (pooled-SD formula), means, sds.
  • Non-parametric (Wilcoxon rank-sum / Mann-Whitney U): U (= R's W statistic for group 1), pvalue_u (normal approximation with tie correction and continuity correction), effect_r (rank-biserial: 1 − 2*U / (n1*n2)), medians.

All per-dimension vectors have length n_dims; means, sds, and medians are 2 × n_dims matrices with row 0 = group 1, row 1 = group 2. Entries are NaN when a statistic is undefined (e.g. n < 2 for parametric tests, or n = 0 for either group).

Member Data Documentation

◆ cohens_d

arma::vec qe::GroupStats::cohens_d

Cohen's d (pooled-SD formula, group1 − group2).

◆ df

arma::vec qe::GroupStats::df

Welch–Satterthwaite degrees of freedom.

◆ effect_r

arma::vec qe::GroupStats::effect_r

Rank-biserial effect: 1 − 2·U / (n1·n2).

◆ means

arma::mat qe::GroupStats::means

2 × n_dims: means; row 0 = group1, row 1 = group2.

◆ medians

arma::mat qe::GroupStats::medians

2 × n_dims: medians; row 0 = group1, row 1 = group2.

◆ n1

int qe::GroupStats::n1

Sample size of group 1.

◆ n2

int qe::GroupStats::n2

Sample size of group 2.

◆ pvalue_t

arma::vec qe::GroupStats::pvalue_t

Two-tailed p-values from the Welch t-test.

◆ pvalue_u

arma::vec qe::GroupStats::pvalue_u

Two-tailed p-values (normal approx, tie + continuity correction).

◆ sds

arma::mat qe::GroupStats::sds

2 × n_dims: sample standard deviations.

◆ t

arma::vec qe::GroupStats::t

Welch two-sample t-statistics.

◆ U

arma::vec qe::GroupStats::U

Wilcoxon rank-sum U for group 1 (= R's W statistic).


The documentation for this struct was generated from the following file: