Title: | Group Iterative Multiple Model Estimation |
---|---|
Description: | Data-driven approach for arriving at person-specific time series models. The method first identifies which relations replicate across the majority of individuals to detect signal from noise. These group-level relations are then used as a foundation for starting the search for person-specific (or individual-level) relations. See Gates & Molenaar (2012) <doi:10.1016/j.neuroimage.2012.06.026>. |
Authors: | Stephanie Lane [aut, trl], Kathleen Gates [aut, cre, ccp], Zachary Fisher [aut], Cara Arizmendi [aut], Peter Molenaar [aut, ccp], Edgar Merkle [ctb], Michael Hallquist [ctb], Hallie Pike [ctb], Teague Henry [ctb], Kelly Duffy [ctb], Lan Luo [ctb], Adriene Beltz [csp], Aidan Wright [csp], Jonathan Park [ctb], Sebastian Castro Alvarez [ctb] |
Maintainer: | Kathleen M Gates <[email protected]> |
License: | GPL-2 |
Version: | 0.7-181111 |
Built: | 2024-10-25 06:19:55 UTC |
Source: | https://github.com/gateslab/gimme |
This package contains functions to automatically identify the structure of group- and individual-level networks from a range of vector autoregressive models, estimated with structural equation modeling.
Researchers across varied domains gather multivariate data for each individual unit of study across multiple occasions of measurement. Generally referred to as time series (or in the social sciences, intensive longitudinal) data, examples include psychophysiological processes such as neuroimaging and heart rate variability, daily diary studies, ecological momentary assessments, data passively collected from devices such as smartphones, and observational coding of social interactions among dyads.
A primary goal for acquiring these data is to understand dynamic processes.
The gimme package contains several functions for use with these data.
These functions include gimmeSEM
, which provides both group-
and individual-level results by looking across individuals for patterns of
relations among variables. A function that provides group-level results,
aggSEM
, is included, as well as a function that provides
individual-level results, indSEM
. The major functions within the gimme package all require the
user to specify the data, although many additional options exist.
Stephanie Lane [aut, trl],
Kathleen Gates [aut, cre],
Zachary Fisher [aut],
Cara Arizmendi [aut],
Peter Molenaar [aut],
Michael Hallquist [ctb],
Hallie Pike [ctb],
Cara Arizmendi [ctb],
Teague Henry [ctb],
Kelly Duffy [ctb],
Lan Luo [ctb],
Adriene Beltz [csp]
Maintainer: KM Gates [email protected]
Concatenates all individual-level data files and fits a group model to the data.
aggSEM(data = "", out = "", sep = "", header = "", ar = TRUE, plot = TRUE, paths = NULL, exogenous = NULL, outcome = NULL, conv_vars = NULL, conv_length = 16, conv_interval = 1, mult_vars = NULL, mean_center_mult = FALSE, standardize = FALSE, hybrid = FALSE, VAR = FALSE)
aggSEM(data = "", out = "", sep = "", header = "", ar = TRUE, plot = TRUE, paths = NULL, exogenous = NULL, outcome = NULL, conv_vars = NULL, conv_length = 16, conv_interval = 1, mult_vars = NULL, mean_center_mult = FALSE, standardize = FALSE, hybrid = FALSE, VAR = FALSE)
data |
The path to the directory where the data files are located, or the name of the list containing each individual's time series. Each file or matrix must contain one matrix for each individual containing a T (time) by p (number of variables) matrix where the columns represent variables and the rows represent time. If in list form, each item in the list (i.e., matrix) must be named. |
out |
The path to the directory where the results will be stored (optional). If specified, a copy of output files will be replaced in directory. If directory at specified path does not exist, it will be created. |
sep |
The spacing of the data files when data are in a directory. "" indicates space-delimited, "/t" indicates tab-delimited, "," indicates comma delimited. Only necessary to specify if reading data in from physical directory. |
header |
Logical. Indicate TRUE for data files with a header, FALSE otherwise. Only necessary to specify if reading data in from physical directory. |
ar |
Logical. If TRUE, begins search for group model with autoregressive (AR) paths open. Defaults to TRUE. |
plot |
Logical. If TRUE, figures depicting relations among variables of interest will automatically be created. For aggregate-level plot, red paths represent positive weights and blue paths represent negative weights. Dashed lines denote lagged relations (lag 1) and solid lines are contemporaneous (lag 0). Defaults to TRUE. |
paths |
|
exogenous |
Vector of variable names to be treated as exogenous (optional). That is, exogenous variable X can predict Y but cannot be predicted by Y. If no header is used, then variables should be referred to with V followed (with no separation) by the column number. If a header is used, variables should be referred to using variable names. Defaults to NULL. |
outcome |
Vector of variable names to be treated as outcome (optional). This is a variable that can be predicted by others but cannot predict. If no header is used, then variables should be referred to with V followed (with no separation) by the column number. If a header is used, variables should be referred to using variable names. |
conv_vars |
Vector of variable names to be convolved via smoothed Finite Impulse Response (sFIR). Defaults to NULL. |
conv_length |
Expected response length in seconds. For functional MRI BOLD, 16 seconds (default) is typical for the hemodynamic response function. |
conv_interval |
Interval between data acquisition. Currently conv_length/conv_interval must be a constant. For fMRI studies, this is the repetition time. Defaults to 1. |
mult_vars |
Vector of variable names to be multiplied to explore bilinear/modulatory effects (optional). All multiplied variables will be treated as exogenous (X can predict Y but cannot be predicted by Y). Within the vector, multiplication of two variables should be indicated with an asterik (e.g. V1*V2). If no header is used, variables should be referred to with V followed by the column number (with no separation). If a header is used, each variable should be referred to using variable names. If multiplication with the lag 1 of a variable is desired, the variable name should be followed by "lag" with no separation (e.g. V1*V2lag). Note that if multiplied variables are desired, at least one variable in the dataset must be specified as exogenous. Defaults to NULL. |
mean_center_mult |
Logical. If TRUE, the variables indicated in mult_vars will be mean-centered before being multiplied together. Defaults to FALSE. |
standardize |
Logical. If TRUE, all variables will be standardized to have a mean of zero and a standard deviation of one. Defaults to FALSE. |
hybrid |
Logical. If TRUE, enables hybrid-VAR models where both directed contemporaneous paths and contemporaneous covariances among residuals are candidate relations in the search space. Defaults to FALSE. |
VAR |
Logical. If true, VAR models where contemporaneous covariances among residuals are candidate relations in the search space. Defaults to FALSE. |
Output is a list of results if saved as an object and/or files printed to a directory if the "out" argument is used.
Stephanie Lane
## Not run: exFit <- aggSEM(data = ts) ## End(Not run) plot(exFit)
## Not run: exFit <- aggSEM(data = ts) ## End(Not run) plot(exFit)
This function identifies structural equation models for each individual that consist of both group-level and individual-level paths.
gimmeSEM(data = NULL, out = NULL, sep = NULL, header = NULL, ar = TRUE, plot = TRUE, subgroup = FALSE, sub_feature = "lag & contemp", sub_method = "Walktrap", sub_sim_thresh = "lowest", confirm_subgroup = NULL, paths = NULL, exogenous = NULL, outcome = NULL, conv_vars = NULL, conv_length = 16, conv_interval = 1, mult_vars = NULL, mean_center_mult = FALSE, standardize = FALSE, groupcutoff = .75, subcutoff = .75, diagnos = FALSE, ms_allow = FALSE, ms_tol = 1e-5, lv_model = NULL, lv_estimator = "miiv", lv_scores = "regression", lv_miiv_scaling = "first.indicator", lv_final_estimator = "miiv", lasso_model_crit = NULL, hybrid = FALSE, VAR = FALSE, dir_prop_cutoff =0, ordered = NULL)
gimmeSEM(data = NULL, out = NULL, sep = NULL, header = NULL, ar = TRUE, plot = TRUE, subgroup = FALSE, sub_feature = "lag & contemp", sub_method = "Walktrap", sub_sim_thresh = "lowest", confirm_subgroup = NULL, paths = NULL, exogenous = NULL, outcome = NULL, conv_vars = NULL, conv_length = 16, conv_interval = 1, mult_vars = NULL, mean_center_mult = FALSE, standardize = FALSE, groupcutoff = .75, subcutoff = .75, diagnos = FALSE, ms_allow = FALSE, ms_tol = 1e-5, lv_model = NULL, lv_estimator = "miiv", lv_scores = "regression", lv_miiv_scaling = "first.indicator", lv_final_estimator = "miiv", lasso_model_crit = NULL, hybrid = FALSE, VAR = FALSE, dir_prop_cutoff =0, ordered = NULL)
data |
The path to the directory where the data files are located, or the name of the list containing each individual's time series. Each file or matrix must contain one matrix for each individual containing a T (time) by p (number of variables) matrix where the columns represent variables and the rows represent time. Individuals must have the same variables (p) but can have different lengths of observations (T). |
out |
The path to the directory where the results will be stored (optional). If specified, a copy of output files will be replaced in directory. If directory at specified path does not exist, it will be created. |
sep |
The spacing of the data files. Follows R convention. "" indicates space-delimited, backslash "t" indicates tab-delimited, "," indicates comma delimited. Only necessary to specify if reading data in from physical directory. |
header |
Logical. Indicate TRUE for data files with a header. Only necessary to specify if reading data in from physical directory. |
ar |
Logical. If TRUE, begins search for group model with autoregressive (AR) paths freed for estimation. If ms_allow=TRUE, it is recommended to set ar=FALSE. Multiple solutions are unlikely to be found when ar=TRUE. Defaults to TRUE. |
plot |
Logical. If TRUE, graphs depicting relations among variables of interest will automatically be created. Solid lines represent contemporaneous relations (lag 0) and dashed lines reflect lagged relations (lag 1). For individual-level plots, red paths represent positive weights and blue paths represent negative weights. Width of paths corresponds to estimated path weight. For the group-level plot, black represents group-level paths, grey represents individual-level paths, and (if subgroup = TRUE) green represents subgroup-level paths. For the group-level plot, the width of the edge corresponds to the count. Defaults to TRUE. |
subgroup |
Logical. If TRUE, subgroups are generated based on
similarities in model features using the |
sub_feature |
Option to indicate feature(s) used to subgroup individuals. Defaults to "lag & contemp" for lagged and contemporaneous, which is the original method. Can use "lagged" or "contemp" to subgroup solely on features related to lagged and contemporaneous relations, respectively. |
sub_method |
Community detection method used to cluster individuals into subgroups. Options align with those available in the igraph package: "Walktrap" (default), "Infomap", "Louvain", "Edge Betweenness", "Label Prop", "Fast Greedy", "Leading Eigen", and "Spinglass". |
sub_sim_thresh |
Threshold for inducing sparsity in similarity matrix. Options are: the percent of edges in the similarity matrix to set to zero (e.g., .25 would set the lower quartile), "lowest" (default) subtracts the minimum value from all values, and "search" searches across thresholds to arrive at one providing highest modularity. |
confirm_subgroup |
Dataframe. Option only available when subgroup = TRUE. Dataframe should contain two columns. The first
column should specify file labels (the name of the data files without file extension),
and the second should contain integer values (beginning at 1)
specifying the subgroup membership for each individual.
function from the |
paths |
|
exogenous |
Vector of variable names to be treated as exogenous (optional). That is, exogenous variable X can predict Y but cannot be predicted by Y. If no header is used, then variables should be referred to with V followed (with no separation) by the column number. If a header is used, variables should be referred to using variable names. The default for exogenous variables is that lagged effects of the exogenous variables are not included in the model search. If lagged paths are wanted, "&lag" should be added to the end of the variable name with no separation. Defaults to NULL. |
outcome |
Vector of variable names to be treated as outcome (optional). This is a variable that can be predicted by others but cannot predict. If no header is used, then variables should be referred to with V followed (with no separation) by the column number. If a header is used, variables should be referred to using variable names. |
conv_vars |
Vector of variable names to be convolved via smoothed Finite Impulse Response (sFIR). Note, conv_vars are not not automatically considered exogenous variables. To treat conv_vars as exogenous use the exogenous argument. Variables listed in conv_vars must be binary variables. You cannot do lagged variables. If there is missing data in the endogenous variables their values will be imputed for the convolution operation only. Defaults to NULL. |
conv_length |
Expected response length in seconds. For functional MRI BOLD, 16 seconds (default) is typical for the hemodynamic response function. |
conv_interval |
Interval between data acquisition. Currently conv_length/conv_interval must be an integer. For fMRI studies, this is the repetition time. Defaults to 1. |
mult_vars |
Vector of variable names to be multiplied to explore bilinear/modulatory effects (optional). All multiplied variables will be treated as exogenous (X can predict Y but cannot be predicted by Y). Within the vector, multiplication of two variables should be indicated with an asterik (e.g. V1*V2). If no header is used, variables should be referred to with V followed by the column number (with no separation). If a header is used, each variable should be referred to using variable names. If multiplication with the lag 1 of a variable is desired, the variable name should be followed by "lag" with no separation (e.g. V1*V2lag). |
mean_center_mult |
Logical. If TRUE, the variables indicated in mult_vars will be mean-centered before being multiplied together. Defaults to FALSE. |
standardize |
Logical. If TRUE, all variables will be standardized to have a mean of zero and a standard deviation of one. Defaults to FALSE |
groupcutoff |
Cutoff value for group-level paths. Defaults to .75, indicating that a path must be significant across 75% of individuals to be included as a group-level path. |
subcutoff |
Cutoff value for subgroup- level paths. Defaults to .75, indicating that a path must be significant across at least 75% of the individuals in a subgroup to be considered a subgroup-level path. |
diagnos |
Logical. If TRUE provides internal output for diagnostic purposes. Defaults to FALSE. |
ms_allow |
Logical. If TRUE provides multiple solutions when more than one path has identical modification index values. When ms_allow=TRUE, it is recommended to set ar=FALSE. Multiple solutions are unlikely to be found when ar=TRUE. Additionally, subgroup should be set to FALSE. Output files for individuals with multiple solutions will represent the last solution found for the individual, not necessarily the best solution for the individual. |
ms_tol |
Precision used when evaluating similarity of modification indices when ms_allow = TRUE. We recommend that ms_tol not be greater than the default, especially when standardize=TRUE. Defaults to 1e-5. |
lv_model |
Invoke latent variable modeling by providing the measurement model syntax here. lavaan conventions are used for relating observed variables to factors. Defaults to NULL. |
lv_estimator |
Estimator used for factor analysis. Options are "miiv" (default), "pml" (pseudo-ML) or "svd". |
lv_scores |
Method used for estimating latent variable scores from parameters obtained from the factor analysis when lv_model is not NULL. Options are: "regression" (Default), "bartlett". |
lv_miiv_scaling |
Type of scaling indicator to use when "miiv" selected for lv_estimator. Options are "first.indicator" (Default; the first observed variable in the measurement equation is used), "group" (best one for the group), or "individual" (each individual has the best one for them according to R2). |
lv_final_estimator |
Estimator for final estimations. "miiv" (Default) or "pml" (pseudo-ML). |
lasso_model_crit |
When not null, invokes multiLASSO approach for the GIMME model search procedure. Arguments indicate the model selection criterion to use for model selection: 'bic' (select on BIC), 'aic', 'aicc', 'hqc', 'cv' (cross-validation). |
hybrid |
Logical. If TRUE, enables hybrid-VAR models where both directed contemporaneous paths and contemporaneous covariances among residuals are candidate relations in the search space. Defaults to FALSE. |
VAR |
Logical. If true, VAR models where contemporaneous covariances among residuals are candidate relations in the search space. Defaults to FALSE. |
dir_prop_cutoff |
Option to require that the directionality of a relation has to be higher than the reverse direction for a prespecified proportion of indivdiuals. |
ordered |
A character vector containing the names of all ordered categorical variables in the model. |
Output is a list of results if saved as an object and/or files printed to a directory if the "out" argument is used.
Zachary Fisher, Kathleen Gates, & Stephanie Lane
Gates, K.M. & Molenaar, P.C.M. (2012). Group search algorithm recovers effective connectivity maps for individuals in homogeneous and heterogeneous samples. NeuroImage, 63, 310-319.
Lane, S.T. & Gates, K.M. (2017). Automated selection of robust individual-level structural equation models for time series data. Structural Equation Modeling.
Adriene M. Beltz & Peter C. M. Molenaar (2016) Dealing with Multiple Solutions in Structural Vector Autoregressive Models, Multivariate Behavioral Research, 51:2-3, 357-373.
## Not run: paths <- 'V2 ~ V1 V3 ~ V4lag' fit <- gimmeSEM(data = simData, out = "C:/simData_out", subgroup = TRUE, paths = paths) print(fit, mean = TRUE) print(fit, subgroup = 1, mean = TRUE) print(fit, file = "group_1_1", estimates = TRUE) print(fit, subgroup = 2, fitMeasures = TRUE) plot(fit, file = "group_1_1") ## End(Not run)
## Not run: paths <- 'V2 ~ V1 V3 ~ V4lag' fit <- gimmeSEM(data = simData, out = "C:/simData_out", subgroup = TRUE, paths = paths) print(fit, mean = TRUE) print(fit, subgroup = 1, mean = TRUE) print(fit, file = "group_1_1", estimates = TRUE) print(fit, subgroup = 2, fitMeasures = TRUE) plot(fit, file = "group_1_1") ## End(Not run)
This object contains a list of simulated time series data for twenty-five individuals. Each data set has 500 time points and five variables. The fifth variable represents an onset vector for stimulation.
HRFsim
HRFsim
A list of data frames with 25 individuals, who each have 500 observations on 5 variables.
This function identifies structural equation models for each individual. It does not utilize any shared information from the sample.
indSEM(data = NULL, out = NULL, sep = NULL, header = NULL, ar = TRUE, plot = TRUE, paths = NULL, exogenous = NULL, outcome = NULL, conv_vars = NULL, conv_length = 16, conv_interval = 1, mult_vars = NULL, mean_center_mult = FALSE, standardize = FALSE, hybrid = FALSE, VAR = FALSE)
indSEM(data = NULL, out = NULL, sep = NULL, header = NULL, ar = TRUE, plot = TRUE, paths = NULL, exogenous = NULL, outcome = NULL, conv_vars = NULL, conv_length = 16, conv_interval = 1, mult_vars = NULL, mean_center_mult = FALSE, standardize = FALSE, hybrid = FALSE, VAR = FALSE)
data |
The path to the directory where the data files are located, or the name of the list containing each individual's time series. Each file or matrix must contain one matrix for each individual containing a T (time) by p (number of variables) matrix where the columns represent variables and the rows represent time. |
out |
The path to the directory where the results will be stored (optional). If specified, a copy of output files will be replaced in directory. If directory at specified path does not exist, it will be created. |
sep |
The spacing of the data files. "" indicates space-delimited, "/t" indicates tab-delimited, "," indicates comma delimited. Only necessary to specify if reading data in from physical directory. |
header |
Logical. Indicate TRUE for data files with a header. Only necessary to specify if reading data in from physical directory. |
ar |
Logical. If TRUE, begins search for individual models with autoregressive (AR) paths open. Defaults to TRUE. |
plot |
Logical. If TRUE, graphs depicting relations among variables of interest will automatically be created. Defaults to TRUE. For individual- level plots, red paths represent positive weights and blue paths represent negative weights. |
paths |
lavaan-style syntax containing paths with which to begin model
estimation. That is, Y~X indicates that Y is regressed on X, or X
predicts Y. Paths can also be set to a specific value for estimation using |
exogenous |
Vector of variable names to be treated as exogenous. That is, exogenous variable X can predict Y but cannot be predicted by Y. If no header is used, then variables should be referred to with V followed (with no separation) by the column number. If a header is used, variables should be referred to using variable names. Defaults to NULL. |
outcome |
Vector of variable names to be treated as outcome (optional). This is a variable that can be predicted by others but cannot predict. If no header is used, then variables should be referred to with V followed (with no separation) by the column number. If a header is used, variables should be referred to using variable names. |
conv_vars |
Vector of variable names to be convolved via smoothed Finite Impulse Response (sFIR). Defaults to NULL. |
conv_length |
Expected response length in seconds. For functional MRI BOLD, 16 seconds (default) is typical for the hemodynamic response function. |
conv_interval |
Interval between data acquisition. Currently conv_length/conv_interval must be a constant. For fMRI studies, this is the repetition time. Defaults to 1. |
mult_vars |
Vector of variable names to be multiplied to explore bilinear/modulatory effects (optional). All multiplied variables will be treated as exogenous (X can predict Y but cannot be predicted by Y). Within the vector, multiplication of two variables should be indicated with an asterik (e.g. V1*V2). If no header is used, variables should be referred to with V followed by the column number (with no separation). If a header is used, each variable should be referred to using variable names. If multiplication with the lag 1 of a variable is desired, the variable name should be followed by "lag" with no separation (e.g. V1*V2lag). Note that if multiplied variables are desired, at least one variable in the dataset must be specified as exogenous. Defaults to NULL. |
mean_center_mult |
Logical. If TRUE, the variables indicated in mult_vars will be mean-centered before being multiplied together. Defaults to FALSE. |
standardize |
Logical. If TRUE, all variables will be standardized to have a mean of zero and a standard deviation of one. Defaults to FALSE. |
hybrid |
Logical. If TRUE, enables hybrid-VAR models where both directed contemporaneous paths and contemporaneous covariances among residuals are candidate relations in the search space. Defaults to FALSE. |
VAR |
Logical. If true, VAR models where contemporaneous covariances among residuals are candidate relations in the search space. Defaults to FALSE. |
Output is a list of results if saved as an object and/or files printed to a directory if the "out" argument is used.
Stephanie Lane
## Not run: fit <- indSEM(data = "C:/data100", out = "C:/data100_indSEM_out", sep = ",", header = FALSE) print(fit, file = "group1.1", estimates = TRUE) plot(fit, file = "group1.1") ## End(Not run)
## Not run: fit <- indSEM(data = "C:/data100", out = "C:/data100_indSEM_out", sep = ",", header = FALSE) print(fit, file = "group1.1", estimates = TRUE) plot(fit, file = "group1.1") ## End(Not run)
This object contains a fitted gimme object where multiple solutions gimme was used. The simulated data had 25 individuals, each with 100 time points.
ms.fit
ms.fit
A fitted gimme object, where multiple solutions gimme was used.
This function estimates the basis vectors related to responses following a binary impulse and convolves that binary impulse vector.
convolveFIR(ts_list = NULL, varLabels = NULL, conv_length = 16, conv_interval = 1)
convolveFIR(ts_list = NULL, varLabels = NULL, conv_length = 16, conv_interval = 1)
ts_list |
a list of dataframes. |
varLabels |
a list of variable sets. Contains varLabels$coln, all column names, varLabels$conv, the names of variables to convolve, and varLabels$exog, a list of exogenous variables (if any). |
conv_length |
Expected response length in seconds. For functional MRI BOLD, 16 seconds (default) is typical for the hemodynamic response function. |
conv_interval |
Interval between data acquisition. Currently must be a scalar For fMRI studies, this is the repetition time. Defaults to 1. |
This object contains a list of simulated time series data for twenty-five individuals with 200 time points and 10 variables, or regions of interest.
simData
simData
A list of data frames with 25 individuals, who each have 200 observations on 10 variables.
This object contains a list of simulated time series data for twenty individuals with 500 time points and 9 variables, or regions of interest.
simDataLV
simDataLV
A list of data frames with 20 individuals, who each have 500 observations on 9 variables.
This function simulates data. It allows for structural VAR and VAR data generating models.
simulateVAR(A = NULL, Phi = NULL, Psi = NULL, subAssign = NULL, N = NULL, ASign = "random", PhiSign = "random", Obs = NULL, indA = 0.01, indPhi = 0.01, indPsi = 0.00)
simulateVAR(A = NULL, Phi = NULL, Psi = NULL, subAssign = NULL, N = NULL, ASign = "random", PhiSign = "random", Obs = NULL, indA = 0.01, indPhi = 0.01, indPsi = 0.00)
A |
A matrix (for no subgroups) or list of A matrices, with slice # = # of subgroups. |
Phi |
Phi matrix (for no subgroups) or list of Phi matrices, with slice # = # of subgroups. |
Psi |
matrix (for no subgroups) or list of Psi matrices, with slice # = # of subgroups. |
subAssign |
Optional vector of length N that indicates which subgroup each individual is in. |
N |
Number of indvidiuals. |
ASign |
Defaults to "random" for ind level paths, with 50 percent chance of positive and 50 percent negative, other option is either "neg" or "pos" which provides all negative or all positive relations, respectively. |
PhiSign |
Defaults to "random" for ind level paths, with 50 percent chance of positive and 50 percent negative, other option is either "neg" or "pos" which provides all negative or all positive relations, respectively. |
Obs |
Number of observations (T) per individual. Burn in of 400 is used to generate then discarded. |
indA |
Sparsity of individual-level A paths. 0 indicates no individual-level. Use decimals. Default is 0.01, meaning that each path that is not in the group-level A matrix has a 0.01 chance of being added. |
indPhi |
Sparsity of individual-level Phi paths. 0 indicates no individual-level. Use decimals. Default is 0.01, meaning that each path that is not in the group-level Phi matrix has a 0.01 chance of being added. |
indPsi |
Sparsity of individual-level Psi paths. 0 indicates no individual-level. Use decimals. Default is 0, meaning that each path that is not in the group-level Psi matrix has a 0 chance of being added at the ind. level. Individual- level paths added at this rate per individual. |
KM Gates, Ai Ye, Ethan McCormick, & Zachary Fisher
This function allows for the exploration of divergences in multiple solutions gimme for both the group and individuals.
solution.tree(x, level = c("group", "individual"), cols = NULL, ids = "all", plot.tree = FALSE)
solution.tree(x, level = c("group", "individual"), cols = NULL, ids = "all", plot.tree = FALSE)
x |
A fitted gimme object. |
level |
A character vector indicating what levels of the solution tree you would like returned. Options are "group", "individual", or c("group", "individual"). Defaults to c("group", "individual"). |
cols |
A character vector indicating additional information to include in tree plot. Options include "stage", "pruned", "rmsea", "nnfi", "cfi","srmr", "grp_sol", "bic", "aic", "modularity." Defaults to NULL. |
ids |
A character vector indicating the names of subjects to print. Defaults to "all." |
plot.tree |
Logical. If TRUE, plot of tree is produced. Defaults to FALSE. |
solution.tree
This object contains a list of simulated time series data for five individuals with 50 time points and 3 variables, or regions of interest.
ts
ts
A list of data frames with 5 individuals, who each have 50 observations on 3 variables.