
Calculate ENA Moving Window Size via Cross-Covariance Decay (CCD)
Source:R/ena.ccd.window.R
ena.ccd.window.RdCalculates the recommended moving window size for Epistemic Network Analysis (ENA) by estimating the half-life decay lag of the noise-corrected Frobenius norm across pooled conversation cross-covariance matrices.
Usage
ena.ccd.window(
x,
codeNames = NULL,
conversation_cols = NULL,
max_window = 20,
min_overlap = 10
)Arguments
- x
A
data.frame,data.table, or anENAdata/ena.setaccumulation object.- codeNames
A
charactervector of column names representing binary codes (optional ifxis an ENA object).- conversation_cols
A
charactervector of column names defining discrete conversations (optional ifxis an ENA object).- max_window
A
numericvalue indicating the maximum lag window size to evaluate. Default is20.- min_overlap
A
numericvalue specifying the minimum required overlapping rows (\(N - lag\)) per conversation subset. Default is10.
Details
The function computes pooled cross-covariance curves over lags 0:max_window. It normalizes
the noise-corrected Frobenius norm relative to its peak value and identifies the first lag step strictly
after the peak where the normalized norm falls below 0.5 (half-life threshold).