Learn R Programming

gimme (version 0.1-2)

gimme: Group iterative multiple model estimation.

Description

This function identifies structural equation models for each individual that consist of both group-level and individual-level paths.

Usage

gimme(data     = "",
      sep      = "",
      header   = ,
      out      = "",
      ar       = FALSE,
      plot     = TRUE,
      subgroup = FALSE,
      paths    = NULL)

Arguments

data
Path to the directory where the data files are located. Each file 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.
sep
The spacing of the data files. "" indicates space-delimited, "/t" indicates tab-delimited, "," indicates comma delimited.
header
Logical. Indicate TRUE for data files with a header.
out
The path to the directory where the results will be stored. This must be generated by the user prior to running the function.
ar
Logical. If TRUE, begins search for group model with autoregressive (AR) paths open. Defaults to FALSE.
plot
Logical. If TRUE, graphs depicting relations among variables of interest will automatically be created. For individual-level plots, red paths represent positive weights and blue paths represent negative weights. For the group-level plot, black represents
subgroup
Logical.Logical. If TRUE, subgroups are generated based on similarities in model features using the walktrap.community function from the igraph package.
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. If no header is used, then variables should be referred to with V followed (with no separation) by t

itemize

  • betas

item

  • subgroupk_lagged
  • subgroupk_plot
  • SEs
  • plots

Details

In main output directory:
  • all.elements.summary
{Contains summary information for paths identified at the group- and individual-level.} all.elements {Contains information for all paths identified at the group- and individual-level.} all.fit {Contains model fit information for individual-level models. If subgroups are requested, this file also contains the subgroup membership for each individual.} finalpaths_contemp Contains counts of total number of paths (contemporaneous predicting contemporaneous) estimated for sample. finalpaths_lagged Contains counts of total number of paths (lagged predicting contemporaneous) estimated for the sample.

References

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.

Examples

Run this code
paths <- 'V2 ~ V1
          V3 ~ V4lag'

gimme(data     = "C:/data100",
      sep      = ",",
      header   = FALSE,
      out      = "C:/data100_gimme_out",
      ar       = TRUE,
      plot     = TRUE,
      paths    = paths,
      subgroup = FALSE)

Run the code above in your browser using DataLab