dynEGA {EGAnet}  R Documentation 
Estimates dynamic factors in multivariate time series (i.e. longitudinal data, panel data, intensive longitudinal data) at multiple
time scales, in different levels of analysis: individuals (intraindividual structure), groups or population (structure of the population).
Exploratory graph analysis is applied in the derivatives estimated using generalized local linear approximation (glla
). Instead of estimating factors by modeling how variables are covarying, as in traditional
EGA, dynEGA is a dynamic model that estimates the factor structure by modeling how variables are changing together.
GLLA is a filtering method for estimating derivatives from data that uses time delay embedding and a variant of SavitzkyGolay filtering to accomplish the task.
dynEGA(
data,
n.embed,
tau = 1,
delta = 1,
level = c("individual", "group", "population"),
id = NULL,
group = NULL,
use.derivatives = 1,
model = c("glasso", "TMFG"),
model.args = list(),
algorithm = c("walktrap", "louvain"),
algorithm.args = list(),
corr = c("cor_auto", "pearson", "spearman"),
ncores,
...
)
data 
A dataframe with the variables to be used in the analysis. The dataframe should be in a long format (i.e. observations for the same individual (for example, individual 1) are placed in order, from time 1 to time t, followed by the observations from individual 2, also ordered from time 1 to time t.) 
n.embed 
Integer.
Number of embedded dimensions (the number of observations to be used in the 
tau 
Integer.
Number of observations to offset successive embeddings in the 
delta 
Integer.
The time between successive observations in the time series.
Default is 
level 
Character.
A string indicating the level of analysis. If the interest is
in modeling the intraindividual structure only (one dimensionality structure per individual), then Current options are:

id 
Numeric. Number of the column identifying each individual. 
group 
Numeric or character.
Number of the column identifying group membership. Must be specified only if 
use.derivatives 
Integer. The order of the derivative to be used in the EGA procedure. Default to 1. 
model 
Character. A string indicating the method to use. Current options are:

model.args 
List.
A list of additional arguments for 
algorithm 
A string indicating the algorithm to use or a function from Current options are:

algorithm.args 
List.
A list of additional arguments for 
corr 
Type of correlation matrix to compute. The default uses

ncores 
Numeric.
Number of cores to use in computing results.
Defaults to If you're unsure how many cores your computer has,
then use the following code: 
... 
Additional arguments.
Used for deprecated arguments from previous versions of 
Hudson Golino <hfg9s at virginia.edu>
Boker, S. M., Deboeck, P. R., Edler, C., & Keel, P. K. (2010) Generalized local linear approximation of derivatives from time series. In S.M. Chow, E. Ferrer, & F. Hsieh (Eds.), The Notre Dame series on quantitative methodology. Statistical methods for modeling human dynamics: An interdisciplinary dialogue, (p. 161178). Routledge/Taylor & Francis Group.
Deboeck, P. R., Montpetit, M. A., Bergeman, C. S., & Boker, S. M. (2009) Using derivative estimates to describe intraindividual variability at multiple time scales. Psychological Methods, 14(4), 367386.
Golino, H., Christensen, A. P., Moulder, R. G., Kim, S., & Boker, S. M. (2021). Modeling latent topics in social media using Dynamic Exploratory Graph Analysis: The case of the rightwing and leftwing trolls in the 2016 US elections. Psychometrika.
Savitzky, A., & Golay, M. J. (1964). Smoothing and differentiation of data by simplified least squares procedures. Analytical Chemistry, 36(8), 16271639.
# Population structure:
## plot.type = "qqraph" used for CRAN checks
## plot.type = "GGally" is the default
dyn.random < dynEGA(data = sim.dynEGA, n.embed = 5, tau = 1,
delta = 1, id = 21, group = 22, use.derivatives = 1,
level = "population", model = "glasso", ncores = 2)
plot(dyn.random, plot.type = "qgraph")
# Group structure:
dyn.group < dynEGA(data = sim.dynEGA, n.embed = 5, tau = 1,
delta = 1, id = 21, group = 22, use.derivatives = 1,
level = "group", model = "glasso", ncores = 2)
plot(dyn.group, ncol = 2, nrow = 1, plot.type = "qgraph")
# Intraindividual structure (commented out for CRAN tests):
# dyn.individual < dynEGA(data = sim.dynEGA, n.embed = 5, tau = 1,
# delta = 1, id = 21, group = 22, use.derivatives = 1,
# level = "individual", model = "glasso", ncores = 2)