15.4 Networks based on Multidimensional RQA
We can use the ManyAnalysts dataset to create a recurrence matrix based on all the observed variables.
data("manyAnalystsESM")
<- manyAnalystsESM[4:10]
df <- rn(y1 = df, doEmbed = FALSE, weighted = TRUE, weightedBy = "si", emRad = NA) RN
15.4.1 Extracting Phases
Let’s extract a phases and plot them.
library(igraph)
# This returns 6 phases which have minimally 1 state
<- rn_phases(RN, doPhaseProfilePlot = TRUE, excludeOther = TRUE) phaseOut
<- na.exclude(phaseOut$phase_number)
markEpochsBy <- graph_from_adjacency_matrix(RN, mode = "directed", weighted = TRUE, diag = FALSE)
g E(g)$weight <- abs(E(g)$weight)
V(g)$size <- 1 + (igraph::strength(g, loops = FALSE)/(igraph::vcount(g)-1)) #strength(gr0) 1+
::make_spiral_graph(g = g, type = "Euler",markEpochsBy = markEpochsBy, markTimeBy = FALSE, doPlot = TRUE, epochLabel = "Phase") casnet