Learn R Programming

semTools (version 0.4-14)

lisrel2lavaan: Latent variable modeling in '>lavaan using LISREL syntax

Description

This function can be used to estimate a structural equation model in '>lavaan using LISREL syntax. Data are automatically imported from the LISREL syntax file, or, if data files names are provided within LISREL syntax, from the same directory as the syntax itself, as per standard LISREL data importation.

Usage

lisrel2lavaan(filename = NULL, analyze = TRUE, silent = FALSE, ...)

Arguments

filename

Filename of the LISREL syntax file. If the filename arguement is not specified, the user will be prompted with a file browser with which LISREL syntax file can be selected (recommended).

analyze

Logical. If analyze==TRUE (default), data will be automatically imported and analyzed; '>lavaan summary output displayed and fit object will be returned silently. If analyze==FALSE, data will not be imported or analyzed; instead, a '>lavaan parameter table containing the model specifications will be returned.

silent

Logical. If false (default) the data will be analyzed and output displayed. If true, a fit object will be returned and summary output will not be displayed.

Additional arguments to be passed to lavaan.

Value

Output summary is printed to screen and '>lavaan fit object is returned.

Examples

Run this code
# NOT RUN {
	## calling lisrel2lavaan without specifying the filename argument will  
	## open a file browser window with which LISREL syntax can be selected. 
	
	## any additional arguments to be passed to lavaan for data analysis can
	## be specified normally. 
	
	lisrel2lavaan(se="standard")
	## lavaan output summary printed to screen
	## lavaan fit object returned silently
	
	## manual file specification 
	
	lisrel2lavaan(filename="myFile.LS8", se="standard")
	## lavaan output summary printed to screen
	## lavaan fit object returned silently
# }

Run the code above in your browser using DataLab