Skip to contents

Computes multivariate sample entropy (mvSampEn) from a pre-built state-space embedding, separately for each participant.

Input must be an experdyn_statespace object from make_statespace(). The function does not perform any additional embedding — each row of the state-space matrix is already a trajectory point that encodes the optimal delay τ and dimension d chosen by estimate_embedding_parameters() and applied by make_statespace(). SampEn is then computed directly on this sequence of trajectory points:

  • B = proportion of all point-pairs \((i \ne j)\) whose Chebyshev distance is \(\le r\) (same-neighbourhood).

  • A = proportion of consecutive point-pairs where both the current and next state-space point are simultaneously within \(r\) (trajectory-neighbourhood).

  • \(\text{mvSampEn} = -\log(A / B)\).

For each participant, entropy is first computed within each subseries and then aggregated (weighted by number of template pairs) to yield a single participant-level estimate.

Usage

compute_mvsampen(
  data,
  r = 0.2,
  participant_col = "ID",
  series_col = "Series_ID",
  time_col = "time"
)

Arguments

data

An experdyn_statespace object returned by make_statespace().

r

[numeric(1): 0.2]
Matching tolerance. Data are z-scored within each subseries before matching, so r is on a standardised scale.

participant_col

[character(1): "ID"]
Participant identifier column.

series_col

[character(1): "Series_ID"]
Subseries identifier column.

time_col

[character(1): "time"]
Optional time column used for ordering within subseries when present.

Value

An object of class experdyn_mvsampen with:

ElementDescription
participant_entropyOne row per participant with aggregated entropy.
series_entropyOne row per participant-subseries entropy estimate.
dimensionsStatespace embedding dimensions used as input.
rMatching tolerance used.
variablesVariables included in entropy estimation.

See also