Metastability and Eye Movements: A Dynamical‑Systems Interpretation

  1. Why metastability is a natural language for gaze behavior The idea that perception, attention, and neural activity evolve through transiently stable states has deep roots in cognitive science and neuroscience. Concepts such as attractors , basins , noise‑induced transitions , and escape times appear in work on perceptual switching, decision‑making, and neural population dynamics (Kelso, 1995; Rabinovich et al., 2008; Deco & Jirsa, 2012). Eye movements, especially the alternation between fixations and saccades ,   fit remarkably well into this metastable picture. The Freidlin–Wentzell theory of rare events (Freidlin & Wentzell, 2012) provides a rigorous mathematical language for these intuitions. 2. Fixations as metastable states  Consider the gaze position X t as the state of a stochastic dynamical system. During a fixation the  gaze remains confined to a small region, microsaccades and noise generate small fluctuations, and the gaze tends to return...

Why Analyzing Cycles and Trends in Irregular Time Series Is Harder Than It Looks

 Modern data streams rarely behave the way classical time series textbooks expect.

Wearables, physiological sensors, ecological monitors, experimental devices — they all produce signals that are irregular, noisy, and full of gaps. Yet we often analyze them using tools designed for perfectly regular sampling.

The result is predictable: distorted trends, misleading cycles, and interpretations driven more by sampling artifacts than by the underlying system.

This post introduces the motivation behind cycleTrendR, an R package designed to extract cycles, trends, and state transitions from real-world, irregular time series. Before diving into code, let’s outline the conceptual problem the package aims to solve.

Figure 1. Conceptual pipeline for analyzing irregular time series with cycleTrendR



Legend of Figure 1.  The diagram summarizes the core workflow: starting from irregular data, the package applies adaptive trend smoothing, spectral estimation via Lomb–Scargle, and extracts cycles and changepoints. Each step is designed to handle uneven sampling, noise, and structural transitions in real-world signals.


1. Real-world data are irregular by nature

In theory, a time series is a sequence of equally spaced observations.

In practice, they almost never are.

  • Wearable heart rate data fluctuate in sampling frequency depending on motion or sensor quality.

  • Physiological signals contain gaps, noise bursts, and periods of dense sampling.

  • Ecological and environmental measurements are often dependent on factors such as battery life, weather conditions, or transmission delays.

  • Experimental data often include pauses, interruptions, or variable sampling rates.

Irregularity is not an exception — it is the norm.

2. Why classical methods fail on irregular data

Most standard tools assume regular sampling:

  • FFT requires uniform spacing → irregular data produce aliasing and false peaks.

  • Moving averages assume constant time intervals → gaps distort the smoothing.

  • Linear filters behave unpredictably when the time axis is uneven.

  • Trend estimation becomes biased: dense regions look “flat”, sparse regions look “curved”.

Even when these methods run, the results are often mathematically invalid. This is not a software problem — it’s a mismatch between assumptions and reality.

3. Why cycles and trends matter

Cycles and trends are not decorative features; they are the signal’s structure.

  • Cycles reveal internal dynamics: respiratory oscillations, autonomic rhythms, behavioral patterns.

  • Trends capture long-term evolution: recovery, fatigue, adaptation, circadian drift.

  • Transitions mark changes of state: rest → activity, stable → unstable, baseline → perturbation.

Without a reliable way to separate these components, interpretation becomes guesswork.

4. What a robust solution must provide

To analyze irregular time series meaningfully, we need methods that respect the structure of the data:

  • A spectral estimator that works without regular sampling → Lomb–Scargle.

  • A trend smoother that adapts to local density → LOESS/GAM with robust fitting.

  • A way to detect structural changes → changepoint algorithms.

  • A pipeline that integrates these components without requiring manual preprocessing.

This is the conceptual foundation of cycleTrendR.

5. The philosophy behind cycleTrendR

The package is built around a few guiding principles:

  • Adaptive — methods adjust to the data rather than forcing the data to fit the method.

  • Robust — resistant to noise, gaps, and outliers.

  • Universal — applicable to physiology, wearables, ecology, behavioral science, and beyond.

  • Transparent — clear outputs, interpretable plots, no hidden heuristics.

  • Simple — one main function that returns trend, cycles, spectrum, and changepoints.

The goal is not to replace domain-specific tools, but to provide a general, principled framework for analyzing irregular time series.

6. What comes next

In the next post, we’ll explore the internal architecture of cycleTrendR: how it integrates robust trend estimation, spectral analysis, cycle detection, and changepoint identification into a unified pipeline for irregular time series. We’ll cover:

  • The rationale behind each method.
  • How the pipeline handles gaps and uneven sampling.
  • The design principles guiding the package.
  • How the structure supports reproducible, domain‑agnostic analysis.


Comments

Popular posts from this blog

Understanding Anaerobic Threshold (VT2) and VO2 Max in Endurance Training

Diagnosing Singular Fits in Linear Mixed Models: Practical Examples, Code, and Alternatives

Owen's Function: A Simple Solution to Complex Problems