estimate_pillai: Estimate Pillai trace, globally or by group

View source: R/pillai_bhatt.R

estimate_pillaiR Documentation

Estimate Pillai trace, globally or by group

Description

Unified front-end for Pillai-Bartlett trace. If group_col is NULL, computes a single global Pillai trace for the full dataset. If group_col is provided, computes Pillai per group (e.g., per speaker).

Usage

estimate_pillai(
  data,
  features,
  category_col,
  group_col = NULL,
  min_tokens = 20
)

Arguments

data

Data frame.

features

Character vector of numeric feature columns.

category_col

String; category column name.

group_col

Optional character vector of one or more grouping columns. If NULL, a global Pillai value is returned.

min_tokens

Minimum tokens (globally or per group).

Value

A data frame with either one global row or one row per group.


phontrast documentation built on Oct. 7, 2026, 5:06 p.m.