indSEM: Individual-level structural equation model search.

Description Usage Arguments Details Author(s) Examples

View source: R/indSEM.R

Description

This function identifies structural equation models for each individual. It does not utilize any shared information from the sample.

Usage

1
2
3
4
5
6
7
indSEM(data   = "",
       out    = "",
       sep    = "",
       header = ,
       ar     = TRUE,
       plot   = TRUE,
       paths  = NULL)

Arguments

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. 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. To reference lag variables, "lag" should be added to the end of the variable name with no separation. Defaults to NULL.

Details

In main output directory:

In individual output directory (where id represents the original file name for each individual):

Author(s)

Stephanie Lane

Examples

1
2
3
4
5
6
7
8
9
 ## 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)

gimme documentation built on May 30, 2017, 1:44 a.m.

Search within the gimme package
Search all R packages, documentation and source code