PhysioEDA provides a complete pipeline for electrodermal activity (EDA) signal analysis built on the PhysioExperiment data model. This vignette walks through the core analysis workflow: generating or loading EDA data, preprocessing (filtering, artifact correction), tonic/phasic decomposition, SCR peak detection, and feature extraction.
EDA, also known as galvanic skin response (GSR), reflects sympathetic nervous system arousal through changes in skin conductance. The signal can be separated into a slowly varying tonic component (skin conductance level, SCL) and rapid phasic responses (skin conductance responses, SCR).
PhysioEDA provides convenience functions for generating simulated EDA data. For real data, use the I/O functions from PhysioIO.
Before processing, it is important to check signal quality. The
edaQuality() function computes metrics including flatline
detection, artifact percentage, signal-to-noise ratio, and an overall
quality score.
The quality score ranges from 0 to 100. Signals scored as “good” (>= 70) can proceed directly to analysis, while “acceptable” (>= 40) signals may benefit from artifact correction. “Poor” signals (< 40) should be examined manually.
EDA signals are typically lowpass filtered to remove high-frequency
noise. The edaFilter() function uses FFT-based filtering
with smooth frequency-domain transitions.
If the original sampling rate is higher than needed (e.g., 256 Hz), downsample to a rate suitable for EDA analysis (typically 4-10 Hz). Anti-aliasing filtering is applied automatically.
The edaArtifact() function detects artifacts using
threshold, gradient, and flatline methods, and can correct them via
linear interpolation.
The central step in EDA analysis is separating the signal into tonic (SCL) and phasic (SCR) components. PhysioEDA supports four decomposition methods.
The simplest approach uses FFT-based frequency separation. Suitable for quick analyses when physiological accuracy of the tonic component is not critical.
Uses a sliding median window to estimate the tonic component. More robust to outliers than the highpass method.
Implements the method of Benedek and Kaernbach (2010). Deconvolves the signal with a biexponential (Bateman) impulse response function to recover the underlying sudomotor nerve activity driver signal.
Implements a simplified version of the convex optimization approach by Greco et al. (2016). Uses iterative ADMM with Wiener deconvolution and L1 sparsity on the driver signal.
After decomposition, SCR peaks can be detected in the phasic component using either a gradient-based or amplitude threshold method.
The edaFeatures() function computes summary statistics
per channel, including SCR count, rate, mean amplitude, mean SCL, and
area under the phasic curve.
You can also restrict feature extraction to a specific time window:
For statistical analyses that assume normality, EDA data can be transformed using log, square root, z-score, or range normalization.
library(PhysioEDA)
# Step 1: Load or simulate data
x <- make_eda(n_time = 6000, sr = 10)
# Step 2: Check quality
quality <- edaQuality(x)
# Step 3: Artifact correction
x <- edaArtifact(x, correct = "interpolate")
# Step 4: Decompose into tonic and phasic
x <- edaDecompose(x, method = "cda")
# Step 5: Detect SCR peaks
peaks <- edaPeaks(x)
# Step 6: Extract features
features <- edaFeatures(x, peaks = peaks)
# Step 7: Visualize
plotDecompose(x, channel = 1)
plotPeaks(x, peaks = peaks, channel = 1)