LISREL Examples Guide
LISREL Examples Guide
LISREL Examples Guide
To run a SIMPLIS example, select the Open option from the File menu to obtain the Open
dialog box. Select (for example) ex10a.spl from the splex folder. Click Open when done.
Note that a path diagram is obtained by entering the command "Path Diagram" in the file
ex10a.spl, just below the line Sample Size = 900 as shown above. The path diagram is
displayed in the path diagram window.
Once a path diagram is produced, the LISREL menu bar will display a different selection
of options, as shown next.
The default values shown on the path diagram are the parameter estimates. By selecting
the Estimations option from the View menu, one may alternatively select the t-values,
modification indices, etc.
One may change the number of decimals displayed in the path diagram by selecting
SIMPLIS outputs from the Output menu. On the dialog box displayed, change the number
of decimals from the default value of 2.
When output is displayed, one may also use the Options menu to change the font type and
size of the text.
Example 6.6: A simplex model for academic Example 7.1: Attitudes of morality and
performance equality
Data File: EX66.COR Data Files: EX71.RAW, EX71.PML,
Input Files: EX66A.LIS, EX66B.LIS, EX71.ACP
EX66C.LIS, EX66D.LIS Input Files: EX71.PRL, EX71.LIS
Example 7.2: A panel model for political Example 7.3: Factor analysis of
efficacy dichotomous variables
Data Files: PANEL.LAB, PANELUSA.RAW, Data Files: LSAT6.DAT, EX73.PML,
PANELUSA.PME, PANELUSA.ACE, EX73.ACP
PANELUSA.ACP Input Files: EX73.PRL, EX73.LIS
Input Files: EX72A.PRL, EX72B.PRL,
EX72A.LIS, EX72B.LIS
Example 7.4: Analysis of covariance Example 7.5: Estimating and testing a
matrices with WLS correlation structure
Data Files: EX74.RAW, EX74.CML, Data Files: EX75.KML, EX75.ACK
EX74.ACC Input File: EX75.LIS
Input Files: EX74.PRL, EX74.LIS
Example 8.1: Gosta's bad sample Example 8.2: Hypothesis testing and
Data Files: EX81.SIG, EX81.COV power calculation
Input Files: EX81A.LIS, EX81B.LIS, Data Files: EX82.COV, EX82.SIG
EX81C.LIS, EX81D.LIS, EX81E.LIS Input Files: EX82A.LIS, EX82B.LIS,
EX82C.LIS, EX82D.LIS
Example 9.1: Testing equality of factor Example 9.2: Testing equality of factor
structures correlation matrices
Data File: EX91.DAT Data File: EX92.COV
Input Files: EX91A.LIS, EX91B.LIS, Input File: EX92.LIS
EX91C.LIS, EX91D.LIS, EX91E.LIS
Example 9.3: Son's and parents' reports of Example 9.4: Subjective and objective
parental socioeconomic characteristics social class
Data File: None Data File: EX94.DAT
Input File: EX93.LIS Input File: EX94.LIS
Example 10.1: Nine psychological Example 10.2: Head start summer program
variables with factor means Data File: EX102.DAT
Data File: EX101.DAT, EX101.LAB Input File: EX102.LIS
Input File: EX101.LIS
Example 10.3: Estimating a correlation Example 10.4: Berkeley guidance study
from incomplete data Data Files: GIRLS.COV, BOYS.COV,
Data File: EX103.DAT GIRLS.MEA, BOYS.MEA
Input File: EX103.LIS Input Files: EX104A.LIS, EX104B.LIS,
EX104C.LIS
Additional examples are contained in the ls9ex, obsresex, missingex, nsfex, and tutorial
folders. Select the Open option from the File menu to obtain the Open dialog box. Select
(for example) the file ex31a.lis. Click Open when done. The contents of the file ex31a.lis
are displayed.
To produce the path diagram shown below, the keyword PD (Path Diagram) was entered
between the lines containing the words Esayabil and OU in ex31a.lis.
LISREL allows the user to create LISREL or SIMPLIS syntax by drawing the appropriate
path diagram on the screen and then building the corresponding syntax directly from the
path diagram. This procedure will be demonstrated by fitting a CFA (Confirmatory Factor
Analysis) model to the data. To obtain correct standard errors of the estimators of the
parameters, the CFA model should be fitted to the observed covariance matrix. However,
in order to illustrate the various features of the program, the model will be fitted to the
observed correlation matrix.
In confirmatory factor analysis, one builds a model assumed to describe or account for
the empirical data in terms of relatively few parameters. The model is based on a priori
information about the data structure in the form of a specified theory or hypothesis or
knowledge from previous studies based on extensive data.
Some important aspects contained in the SIMPLIS syntax file given above are
o The correlation matrix is read from an external file
o There are two latent variables in the model: Visual and Verbal
Select the File, New option and click on Path Diagram. In the Save As dialog box, select a
filename and a folder in which the path diagram should be saved. For the present example
the folder chosen is splex and the file name selected is cfa6.pth. When done, click Save.
From the Output menu select SIMPLIS Outputs. The dialog box below will appear.
Customize this dialog box according to your preferences. For example, change the
Number of Decimals in the Output option to 4. Make sure that the Invoke Path Diagram
check box (the default) is checked. When done, click OK.
LISREL Examples Guide 14
Before drawing the path diagram, select Toolbars from the View menu and ensure that the
items shown below are selected. These are: Toolbar, Status Bar, Typebar, Variables,
Drawing Bar. Also check the Grid Lines option.
Select the Title and Comments option from the Setup menu to obtain the Title and
Comments dialog box.
The first item on the Title and Comments dialog box is the Title for the particular analysis.
Provision is also made for any additional Comments that the user may wish to enter.
After typing in the title and (optionally) the comments, click on Next to go to the Group
Names dialog box.
In a similar manner, use the down arrow key to create text boxes in the Latent Variables
column and enter the names Visual and Verbal. Note that a label name, which may include
blanks, may not exceed 8 characters.
Select Correlations from the Statistics from: drop-down list box and also Correlations
from the Matrix to be analyzed drop-down list box. In the Number of Observations string
We now proceed with the actual drawing of the path diagram. Start by clicking on the VIS
PERC label under the Observed variables portion of the Labels window. Hold the mouse
button down and "drag" the label to the draw area indicated by the grid lines. A
rectangular-shaped object will appear on this part of the screen when the mouse button is
released as shown below. Note also that
The latent variables are assumed to be KSI (or independent) variables unless
appropriate squares under the Eta-column are clicked.
Repeat the same procedure for each of the remaining 5 variables by clicking on a label
(left mouse button) and dragging the object to the draw area on the screen. The result of
these operations should look similar to the image given below:
o Choose Select all from the Edit menu, or draw a rectangle with the mouse
pointer around all the objects to be included.
o Move the mouse pointer to the vicinity of the selected objects and click the
right mouse button. The menu shown below will appear on the draw part of
the screen.
o Select the Align>Left option. Once this is done, select the Even Space >
Vertically option. One can, alternatively, use the Align option on the Image
menu to achieve this.
Finally, arrows can be drawn pointing from the latent variables to the observed variables.
To accomplish this, click on the single-headed arrow of the Draw toolbar (seen on the
right of the picture given below) and move the mouse pointer to within one of the
elliptically shaped objects. With the left mouse button held down, drag the arrow to
LISREL Examples Guide 20
within a rectangular-shaped object. Release the mouse button when the colors of both
objects change. Note that the Draw menu on the main menu bar can also be used when
drawing path diagrams. Related draw tool options are contained in this menu.
Proceed in a similar fashion to graphically display the relationships between the observed
and latent variables as shown on the next image.
In the previous sections we showed how LISREL models may be specified and estimated
by drawing the appropriate path diagram from which the SIMPLIS or LISREL syntax is
created. The examples used were based on data from a single sample. The path diagram
can, however, also be used to create syntax for models based on data from several
samples simultaneously, according to a multiple-group LISREL model with some or all
parameters constrained to be equal over groups.
Any LISREL model may be specified and fitted for each group of data. However, LISREL
assumes by default that the models are identical over groups, i.e., all relationships and all
parameters are the same in each group. Thus, only differences between groups need to be
specified.
Table 1 below gives sample covariance matrices for two samples ( N1 = 865, N 2 = 900,
respectively) of candidates who took the Scholastic Aptitude Test in January 1971. The
four measures are, in order, VERBAL40, a 40-item verbal aptitude section, VERBAL50, a
separately timed 50-item verbal aptitude section, MATH35, a 35-item math aptitude
section, and MATH25, a separately timed 25-item math aptitude section.
The data are used here to illustrate how one can test equality of factor loadings and factor
correlations in a confirmatory factor analysis model, while allowing the error variances to
be different.
We regard VERBAL40 and VERBAL50 as indicators of a latent variable Verbal and MATH35
and MATH25 as indicators of a latent variable Math. The model we consider is shown in
the figure below.
o the four factor loadings corresponding to the paths from Verbal and Math to the
observed variables,
o the correlation between Verbal and Math, and
o the four error variances of the observed variables.
We begin by constructing a data file pdex10.cov containing the two covariance matrices.
In free format, each covariance matrix can be written on one line. The file pdex10.cov
(not part of the LISREL installation) is given below and once created, is stored in the
tutorial folder.
We assume that all parameters are the same in both groups. The syntax file pdex10a.spl
is:
Group 1: Testing Equality Of Factor Structures Model A: Factor Loadings, Factor Correlation,
Error Variances Invariant
Observed Variables: VERBAL40 VERBAL50 MATH35 MATH25
Covariance Matrix from File PDEX10.COV
Sample Size = 865
Latent Variables: Verbal Math
Relationships: VERBAL40 VERBAL50 = Verbal
MATH35 MATH25 = Math
Group 2: Testing Equality Of Factor Structures
Covariance Matrix from File PDEX10.COV
Sample Size = 900
Set the error variances of VERBAL40-MATH25 free
In the syntax above, the data in the covariance matrices and the sample sizes are
different. The names of the variables, observed as well as latent, are the same, and the
model is the same.
Select the New option from the File menu and select Path Diagram in the New dialog box.
Click OK when done. Select the tutorial folder and enter the name pdex10.pth. When
done, click Save.
The SIMPLIS Outputs dialog box will appear. Customize this dialog box according to
your preferences, for example, by changing the Number of Decimals in the Output option
to 4 and by making sure that the Invoke path diagram option is selected. Click OK when
done.
Select the Title and Comments option from the Setup menu to obtain the Titles and
Comments dialog box.
The first item on the Setup dialog box is the Title for the particular problem. Provision is
also made for any additional Comments that the user may wish to enter. After typing in
the title and (optionally) the comments, click Next to go to the Group Names dialog box.
The default number of variables shown on the Labels dialog box is 3, these being CONST,
VAR 1 and VAR 2. Move the mouse pointer to the Observed Variables box and click in the
string field of CONST. Rename this variable to VERBAL40. Press the "down arrow" on the
keyboard to move to the second observed variable string field and enter the label
VERBAL50. Proceed in a similar way to enter the labels MATH35, MATH 25 and the labels
Verbal and Math for the latent variables. Click Next when done to go to the Data dialog
box.
From the Data dialog box, select the second group from the Groups: drop-down list box.
Proceed as outlined above to enter the number of observations (900), file type and matrix
to be analyzed.
We now proceed with the actual drawing of the path diagram. Start by clicking on the
VERBAL40 label under the Observed variables portion of the Variables window. Hold the
mouse button down and drag the label to the draw area. A rectangular-shaped object will
appear on this part of the screen when the mouse button is released as shown below.
Repeat this procedure until all observed variables are dragged to the drawing area as
shown in the next image.
Proceed by dragging the latent variables, Verbal and Math, to the draw area of the path
window. Note that the latent variables are represented by elliptically shaped objects.
LISREL Examples Guide 31
Finally, arrows can be drawn pointing from the latent variables to the observed variables.
To accomplish this, click on the single-headed arrow of the Draw toolbar (seen on the
right of the picture given below). As an alternative, use the Draw menu on the main menu
bar. The related drawing tool options may be selected from this menu.
Once the single-headed arrow (or One-way Path option) has been selected, move the
mouse pointer to within one of the elliptically shaped objects. With the left mouse button
held down, "drag" the arrow to within a rectangular-shaped object. When the colors of
both objects change (see diagram below) release the mouse button.
Proceed in a similar way to graphically display the relationships between the observed
and latent variables:
Select Build SIMPLIS Syntax from the Setup menu. SIMPLIS syntax will be built from the
path diagram and is stored in a system file named pdex10.spj shown below.
To view the corresponding t-values for the second group, select group 2 on the menu bar.
The resultant changes in the path diagram are shown in the next image.
In the example above, the error variances, factor loadings and factor covariance are
constrained to be equal (invariant) across the two groups. To test for invariance of factor
loadings and covariance only, the error variances can be freed as follows. Make sure that
the path diagram is displayed, and then select Group 2 from the Groups: text box. Right-
click in the error variance of VERBAL40 and click the Free option. Repeat this procedure
for the remaining three error variances, and then select the Setup, Build SIMPLIS Syntax
option.
When done, click the Run LISREL icon. The output file reveals two solutions, one for
each group. The value of 2 is reported only after the second group.
In a multi-sample analysis, the 2 is a measure of fit of all models in all groups, and, in
general, this 2 cannot be decomposed into a 2 for each group separately. For our
Aish and Jöreskog (1990) analyzed data on political attitudes. Their data consist of six
ordinal variables measured on the same people at two occasions. Labels assigned to the
12 variables are as follows: NOSAY1, VOTING1, COMPLEX1, NOCARE1, TOUCH1,
INTERES1 (first occasion) and NOSAY2, VOTING2, COMPLEX2, NOCARE2, TOUCH2 and
INTERES2 (second occasion). These data are saved in the LISREL system data file
panelusa.lsf in the tutorial folder.
Select Output Options from the Statistics menu to obtain the Output dialog box. The
Output Options dialog box allows the user to save various matrices as well as the raw
data as files. Select Correlations (to be saved as a LISREL System File (also referred to as
a LISREL summary data file) with extension *.dsf) from the Moment Matrix drop-down list
LISREL Examples Guide 36
box. Check the LISREL System Data check box. Also check the Save to File check box
below Asymptotic Covariance Matrix and enter the name panelusa.acm in the string field.
With the required selections made, click OK to run PRELIS. Note that PRELIS computes
polychoric correlations for all variables that are defined as ordinal, provided that the
number of distinct values of the variables is less than 15.
In this example we use PRELIS to compute the polychoric correlation matrix and
corresponding asymptotic covariance matrix of these correlations. The next step is to
create a path diagram from which the LISREL or SIMPLIS syntax may be built.
Select the New option from the File menu to obtain the New dialog box. From the New
dialog box, select Path Diagram and click OK when done.
The Save As dialog box will appear. Save the new path diagram as panelusa.pth in the
tutorial folder.
Before proceeding to the next step, ensure that the Toolbar, Status Bar, Type Bar,
Variables and Drawing Bar options are selected, see below.
Select the Title and Comments option from the Setup menu to obtain the Title and
Comments dialog box. Use the Title and Comments dialog box to enter a title and to add
additional comments as shown in the example below:
In doing so, the Add/Read Variables dialog box is activated and on this dialog box click
the Read from File: LISREL Summary File radio button.
Click OK to obtain the list of twelve names shown in the Labels dialog box below. To
complete the information in this dialog box, add the names of the two latent variables
Efficac1 and Efficac2 in the Latent Variables window. See the notes at the bottom of the
Labels window. To start typing a name, click anywhere within the Latent Variables
window and type in the name. Alternatively, use the Add Latent Variables button.
LISREL Examples Guide 40
Once names for the observed and latent variables are entered, click Next to go to the Data
dialog box. Select Correlations from the Statistics from drop-down list box.
Note:
Since the location of the asymptotic covariance matrix is stored in the *.dsf file, it is not
necessary to enter the weight matrix details on the Data dialog box.
Close the spreadsheet to return to the path diagram environment. The list of variable
names will appear on the left side on the computer screen. Define the variables NOSAY1,
VOTING1, COMPLEX1, NOSAY2, VOTING2 and COMPLEX2 as Y-variables by checking the
appropriate boxes under the heading Y. Also check the Eta-variable boxes to define
Efficac1 and Efficac2 as Eta latent variables.
The observed values to be used in the drawing of the path diagram can be dragged to the
path diagram area by clicking on a variable name (mouse left button). By holding this
button down, a variable can be dragged to a desired position.
Prior to building the SIMPLIS or LISREL syntax, we adjust the default number of decimals
from 2 to 4. This is accomplished by selecting the Output, LISREL outputs, Estimations…
option.
The method of estimation is also changed from Maximum Likelihood to Weighted Least
Squares by selecting the Output, LISREL output, Estimations option.
Click the Run LISREL icon button to start the analysis. The path diagram shows the
estimated parameter values and 2 -value.
The corresponding SIMPLIS input syntax can be built from the path diagram obtained by
running LISREL. This is accomplished by selecting the Build SIMPLIS Syntax option from
the Setup menu.
This syntax produces a model that consists of X-variables and Y-variables, a KSI latent
variable and an Eta latent variable. Click the Run LISREL icon button to run the analysis.
It is interesting to note that the Y-only model and the model shown below are equivalent.
The model shown above is called the Basic Model, which can be divided into the X-Model,
the Y-Model and the Structural Model. Each of these models may be viewed separately by
clicking on the Basic Model drop-down list box to obtain the list of models.
By selecting the X-Model model type, this portion of the path diagram is displayed. The
X-Model selection and Y-Model selection are shown below.
Finally, the selection of the correlated errors option produces the following diagram.
Note that use was made of the two-headed arrow to add the error covariance paths to the
diagram.
LISREL also allows the user to view the parameter Estimates, Completely Standardized
Solution, Conceptual Diagram, T-values, etc. by clicking on View (main menu bar) or by
clicking on the Estimates drop-down list box as shown below:
The selection of the Conceptual Diagram option produces a path diagram that contains
only variable names and paths between variables. A black and white display of the path
diagram can be obtained by selecting the Black and White option from the Image menu.
The conceptual path diagram, or one with an alternative selection from the Estimations
bar, can be saved as a Windows Metafile (*.wmf) or a Graphic Interchange Format (*.gif)
LISREL Examples Guide 51
file, which may be included as a graphic in, for example, Microsoft Word or Powerpoint.
To save as a *.wmf file, select the Export as Metafile option from the File menu.
5.2 Examples
Example 1
If no relationships are specified, LISREL treats all observed variables as x-variables and all
latent variables as Ksi-variables.
x Λ xξ δ
Example 2
Observed Variables: Y1 - Y3 X1 X2
Covariance matrix:
14.610
-5.250 11.017
-8.057 11.087 31.971
-0.482 0.677 1.559 1.021
-18.857 17.861 28.250 7.139 215.662
Sample Size 173
Y-Variables Y1-Y3
Path Diagram
End of problem
y By Γx ζ
The next example illustrates a model with y-, Eta- and Ksi-variables (but no x-variables
and omitting intercepts)
y Λyη ε
η Γξ ζ
Example 4
The last example illustrates a model with only y- and Eta-variables (omitting intercepts)
y Λyη ε
η Bη ζ
LISREL allows the user to create SIMPLIS syntax by making use of a dialog box keypad.
This keypad, see illustration below, is operated by clicking (left mouse button) on the
appropriate symbol. Note that the <== symbol represents the backspace key while the
symbol <--| denotes the enter key. The path diagram produced by running the program
can subsequently be modified to change the model specifications.
As an illustration, we consider path analysis for latent variables, which, in its most
general form, is a structural equation system for a set of latent variables classified as
dependent or independent. In the application described below, the system is recursive
(see the LISREL 8: SIMPLIS command language guide.)
Recursive models are particularly useful for analyzing data from longitudinal studies in
psychology, education and sociology. The characteristic feature of a longitudinal research
design is that the same measurements are used on the same people at two or more
occasions. Wheaton, et al. (1977) reported on a study concerned with the stability over
time of attitudes such as alienation, and the relation to background variables such as
education and occupation. Data on attitude scales were collected from 932 persons in two
rural regions in Illinois at three points in time: 1966, 1967, and 1971. The variables used
for the present example are the Anomia subscale and the Powerlessness subscale, taken to
be indicators of Alienation. This example uses data from 1967 and 1971 only.
The background variables are the respondent’s education (years of schooling completed)
and Duncan’s Socio-economic Index (SEI). These are taken to be indicators of the
respondent’s socio-economic status (Ses). The sample covariance matrix of the six
observed variables is given below:
y1 y2 y3 y4 x1 x2
ANOMIA67 11.834
POWERL67 6.947 9.364
ANOMIA71 6.819 5.091 12.532
POWERL71 4.783 5.028 7.495 9.986
EDUC -3.839 -3.889 -3.841 -3.625 9.610
SEI* -2.190 -1.883 -2.175 -1.878 3.552 4.503
Notes:
o The error terms of ANOMIA and POWERL are specified to be correlated over
time.
o The four one-way arrows to the right of the diagram represent the
measurement errors in ANOMIA67, POWERL67, ANOMIA71 and POWERL71
respectively.
o The two-way arrows on the right indicate that some of the measurement errors
are correlated. The covariance between the two error terms for each variable
can be interpreted as a specific error variance. For other models for the same
data, see Jöreskog & Sörbom (1989, pp. 213-223).
To set up this model for SIMPLIS is straightforward as shown in the following syntax file:
Stability of Alienation
Observed Variables
ANOMIA67 POWERL67 ANOMIA71 POWERL71 EDUC SEI
Covariance matrix
11.834
6.947 9.364
6.819 5.091 12.532
4.783 5.028 7.495 9.986
-3.839 -3.889 -3.841 -3.625 9.610
-2.190 -1.883 -2.175 -1.878 3.552 4.503
Sample Size 932
Latent Variables Alien67 Alien71 Ses
Relationships
ANOMIA67 POWERL67 = Alien67
ANOMIA71 POWERL71 = Alien71
EDUC SEI = Ses
LISREL Examples Guide 55
Alien67 = Ses
Alien71 = Alien67 Ses
Set Error Covariance of ANOMIA67 and ANOMIA71 Free
Set Error Covariance of POWERL67 and POWERL71 Free
Path Diagram
End of Problem
Notes:
The model is specified in terms of relationships. The first three lines under
Relationships specify the relationships between the observed and the latent
variables. For example, ANOMIA71 POWERL71 = Alien71 means that the observed
variables ANOMIA71 and POWERL71 depend on the latent variable Alien71.
The Line Alien71 = Alien67 Ses means that the latent variable Alien71 depends on
the two latent variables Alien67 and Ses. This is one of the structural relationships.
The files ex6a.spl and ex6b.spl in the splex folder both contain the numeric values of the
covariance matrix of the observed variables.
From the File menu, select Open and locate ex6a.spl in the splex folder. Use the mouse
cursor (left button down) to mark the covariances as shown below. Use the Edit menu and
click Copy or, alternatively, press the Ctrl - C keys on the keyboard.
From File, New select Syntax Only and click OK. Use the Edit, Paste function to copy the
contents of the clipboard to the syntax window or, alternatively, use the Ctrl - V keys on
the keyboard. Use the File, Save As option to save the covariances to the file
wheaton.cov.
Select a filename and a folder in which the SIMPLIS project should be saved. For the
present example the folder chosen is splex and the filename selected is SIMPLIS6.spj.
When done, click Save to go to the SIMPLIS project (SPJ) window.
Before generating syntax, you may optionally select SIMPLIS Outputs from the Output
menu. Customize this dialog box according to your preferences; for example, change the
Number of Decimals in the Output option to 4. When done, click OK.
The following step is to provide information regarding Title and Comments, Groups,
Variables, and Data. Select the Titles and Comments option from the Setup menu. The
first item on the Title and Comments dialog box is the title for the particular problem.
After typing in the title and (optionally) the comments, click on Next to go on with the
setup.
The default number of variables shown on the Labels dialog box is 3, these being CONST,
VAR 1 and VAR 2. Click in the CONST textbox and change the name to ANOMIA67. Enter
the label POWERL67 in the VAR 1 textbox and ANOMIA71 in the VAR 2 text box. Move the
mouse cursor into the ANOMIA71 textbox and use the down arrow to create a fourth text
box. Type in POWERL71 and repeat the procedure for EDUC and SEI.
In a similar manner, use the down arrow key to create text boxes in the Latent Variables
column and enter the names Alien67, Alien71 and Ses. Note that a label name, which may
include blanks, may not exceed 8 characters.
Select Build SIMPLIS Syntax from the Setup menu to create the basic SIMPLIS syntax. The
Build SIMPLIS Syntax option on the Setup menu provides the user with a skeleton of
SIMPLIS commands. There are a few commands that must be included to complete the
SIMPLIS syntax. The first of these commands is:
ANOMIA67 POWERL67=Alien67
To add a line in the syntax window, move the mouse cursor to the end of the keyword
Relationships and click once. Now move the cursor to the Enter key ( <--| ) on the keypad
and click to insert a blank line below the Relationships line.
proceed as follows:
LISREL Examples Guide 59
Click on the observed variable ANOMIA67 (First variable under the heading
Observed) and with the mouse button held down drag the variable name to the
syntax window.
Repeat by dragging the variable name POWERL67 next to ANOMIA67. To continue,
click on the "=" key and then drag the latent variable name Alien67 (first variable
under the heading Latent).
and click. Then click on the enter key and repeat the steps outlined above to insert the
lines:
by using the keypad and by dragging the variable names to the appropriate positions. The
completed syntax should correspond to the lines shown in the SPJ window below:
To run SIMPLIS, click the Run LISREL icon button on the main menu bar.
A path diagram as shown below is produced, as well as the usual output file.
LISREL allows the user to create LISREL syntax interactively by making use of a set of
menus. As an illustration, we consider a second-order factor analysis model.
y Λyη ε
is in the form of a factor analysis model for y with first order factors η and
measurement errors ε . Now suppose that the variables η in turn can be accounted for by
a set of so called second-order factors ξ , so that
η Γξ ς
To illustrate the model, we use data on some cognitive ability tests. The standard
deviations and correlations of two forms of each of five tests are given in the table below.
The sample size (N) is 267.
LISREL Examples Guide 61
Table 2: Correlations and Standard Deviations for Some Cognitive Tests
GESCOM-A 2.42 1
GESCOM-B 2.80 0.74 1
CONWORD-A 3.40 0.33 0.42 1
CONWORD-B 3.19 0.34 0.39 0.65 1
HIDPAT-A 1.94 0.26 0.21 0.15 0.18 1
HIDPAT-B 1.79 0.23 0.24 0.22 0.21 0.77 1
THIROUND 5.63 0.15 0.12 0.14 0.11 0.17 0.20 1
THIBLUE 3.10 0.14 0.14 0.14 0.15 0.06 0.09 0.42 1
VOCABU_A 3.05 -.04 0.03 0.09 0.16 0.06 0.09 0.19 0.21 1
VOCABU_B 2.25 0.02 0.02 0.10 0.23 0.024 0.07 0.09 0.21 0.72 1
We shall examine the hypothesis that the two forms of each test are tau-equivalent,
except for the two-word fluency tests Things Round and Things Blue that are only assumed
to be congeneric. The five true scores are postulated to depend on two factors, the first,
Speed Closure, being measured by the first three tests and the second, Vocabulary, being
measured by the last two tests. The model specification is:
Here * denotes parameters to be estimated and "0" and "1" are fixed parameters. The
LISREL syntax file for this model is as follows:
From the File menu, select New to obtain the New dialog box. Select LISREL Project and
click OK to obtain the Save As dialog box.
Select the tutorial folder and filename sofa.lpj. When done, click Save.
The following step is to provide information regarding the title, additional comments to
be included in the syntax file, the data file and the variables in it. This is accomplished by
selecting the Title and Comments option from the Setup menu. The Title and Comments
dialog box appears. Enter a title and (optional) comments in the Title string field and the
Comments text box.
The default number of variables on the Labels dialog box is 2, these being VAR 1 and VAR
2. Since the present analysis calls for 10 variables, the mouse cursor is moved to the
Observed Variables box. By pressing the Insert key on the computer keyboard eight
times, provision is made for eight additional observed variables, and therefore the total
number becomes ten. Alternatively, the Add List option may be used and var3-var10
entered (or, for example, X3-X10). If the Add List option was used, click OK to return to
the Labels dialog box. Variable labels can alternatively be read in from an existing *.lsf
or *.dsf file. See the section on LISREL system files for more information on this option.
Since we have 7 latent variables, Gescom, Conwor, Hidpat, Things, Vocabu, Speedclo and
Vocabu1, the procedure outlined above for the observed variables is repeated by selecting
Add List on the Latent Variables portion of the Labels dialog box. Add var1-var7 and click
on OK (alternatively the keyboard down arrow may be used). Assign labels to these latent
variables by clicking on the number of each variable. Finally, click Next to go to the Data
dialog box.
The program will now produce the Define Observed Variables dialog box, on which the
user may select Y-variables and X-variables from the list of Variable Names. Since the
present application calls for Y-variables only, all of the variable names are selected as Y-
variables. This is achieved by sequentially clicking on each variable number box and then
on the Select as Y option. Alternatively, with the left mouse button down, drag from
variable number 1 to number 10, release the mouse button and click on the Select as Y
button.
The initial dialog box will indicate that all the elements of Lambda-Y are fixed and equal
to zero. The steps required to obtain the pattern shown in the dialog box below
corresponding to the statements is given next.
VA 1.0 LY(1,1) LY(2,1) LY(3,2) LY(4,2) LY(5,2) LY(6,3) LY(7,4) LY(9,5) LY(10,5)
FR LY(8,4),
o Click on the first rectangle next to the variable description button (that is
under the heading Gescom) and use the computer keyboard to type in the
value of 1, then press the keyboard Enter button.
o Proceed in a similar fashion to enter 1 in the second row, and finally a 1 in the
rectangle corresponding to the row VOCABU B and column Vocabu.
o By clicking on the rectangle in the row THIBLUE and column Things and then
on the Free button, the color of the rectangle will change to indicate that
LY(8,4) is free.
Note that one may move the mouse pointer to a vertical divider line on the dialog box
below. Column widths can subsequently be adjusted by clicking the left button and
dragging the vertical line to the left or the right of its present position.
Highlight the Gamma Full Matrix, Fixed option and click on Specify.
Since the default settings for the parameter matrices Psi and Theta-Epsilon are correctly set
at the default values (see dialog box below), click on Next to go to the Constraints dialog
box.
In the present example, no constraints are imposed on the elements of the parameter
matrices and therefore the Next button is clicked to go to the Output Selections dialog
box.
As an example, we selected Lambda-Y, Gamma and t-values. These files will have the
same filename as the LISREL project file but with different file extensions, these being
*.lys, *.gas, and *.tvs respectively.
Click OK to return to the LISREL project (LPJ) window. The LISREL syntax, saved in the
file sofa.lpj, is shown below:
Click the Run LISREL icon button on the main menu bar to run the problem.
One may modify the path diagram by deleting, fixing or adding paths.
The background variables are the respondent’s education (years of schooling completed)
and Duncan’s Socioeconomic Index (SEI). These are taken to be indicators of the
respondent’s socioeconomic status (SES).
Observed Variables: Anomia 67, Powerlessness 67, Anomia 71, Powerlessness 71,
Education, SEI
The model shown in the path diagram below was fitted by running ex64d.lis (in the lisex
folder).
Subsequently, a data set of size 1500, with 15% of the values missing at random, was
simulated by regarding the fitted covariance matrix as the true population covariance
matrix. This data set is stored as the text file wmas.dat in the missingex folder. A
corresponding *.lsf file, containing the variable names, missing value code, number of
records and the data is stored as wmas.lsf in the tutorial folder. Select File, New, Path
Diagram and save the path diagram in the tutorial folder. In the dialog box below, we used
the name sgroup.pth.
Click the Add/Read Variables button and on the Add/Read Variables dialog box select
LISREL System data file from the Read from file drop-down list. Use the Browse button to
locate wmas.lsf in the tutorial folder.
Mark the first four variables as Y-variables and the first two latent variables as Eta-
variables. (Left) click on each variable name, and with the mouse button down, drag the
variable to the path diagram (PTH) window.
Click on the draw tool (single-headed arrow) and add all the paths as shown below. Start
by moving the mouse cursor to the center of ALIEN67, and, with the mouse button down,
drag the arrow to the center of ANOMIA67 and release the button.
Once all the single paths have been drawn, click on the double-headed arrow. Move the
cursor to the center of the error variance arrow of ANOMIA67, then, with the left mouse
button held down, drag to the center of the error variance arrow of ANOMIA71. Repeat this
procedure to allow for a covariance between POWER67 and POWER71.
The syntax files missex4a.lis and missex4b.spl in the missingex folder contain the
corresponding LISREL and SIMPLIS syntax for fitting the model. Missing values for this
analysis are indicated by a value of -9. A FIML analysis is carried out if the DA line in the
LISREL syntax contains the keyword MI=<value>. This is required if the data file is not a
LSF file:
Click the Run LISREL icon button to obtain a path diagram and output file. Once the data
are read, estimates are obtained of the means and covariances and a 2ln L value is
printed. This value is the 2ln L value for the unrestricted model.
The EM-algorithm is used to obtain estimates of the population means and covariances.
LISREL uses these values to obtain starting values for the maximum likelihood procedure.
Convergence is attained in 8 iterations, and at convergence 2ln L equals 35822.65. This
value is also referred to as the 2ln L value for the saturated model.
Sörbom (1981) reanalyzed some data from the Head Start summer program previously
analyzed by Magidson (1977). Sörbom used data on 303 white children consisting of a
Head Start sample (N = 148) and a matched Control sample (N = 155). The children were
matched on gender and kindergarten attendance, but no attempt had been made to match
on social status variables.
Ability Ses z
Is the same for the two groups? Test the hypothesis 0 and interpret the
results.
A conceptual path diagram for the model fitted to the data is shown below.
The fitted covariance matrices obtained from ex16d.spl (in the splex folder) were used to
simulate a control group data set (sample size 550 and percentage missing 15%) and to
simulate a Head Start data set (sample size of 600 and percentage missing 10%).
To invoke the FIML procedure for the analysis of missing data, the following three
statements must be given in the SIMPLIS syntax in the order shown below.
Relationships:
Ses = CONST
Ability = CONST + Ses
Set the Error Variances of MOTHEDUC - ITPA free
Set the Variance of Ses free
Set the Error Variance of Ability free
Let the Errors of MOTHEDUC and FATHEDUC correlate
LISREL Output: ND=3
Path Diagram
End of Problem
If the data are stored in a LISREL system file (*.lsf), the Observed Variables, Missing Value
Code, Sample Size and Raw data from file control.dat can be replaced with the statement
If a *.lsf file contains missing data, the user should ensure that a global missing value
code is assigned. This can be done by using the Data, Define Variables option.
Subsequently, we illustrate how to build the SIMPLIS (or LISREL) syntax by drawing a
path diagram.
Use the instructions on the bottom of the Group Names dialog box to enter group names,
then click Next to go to the Labels dialog box.
The files control.lsf and experim.lsf containing the Group1 and Group2 data respectively,
are stored in the tutorial folder. Click the Add/Read Variables button, select LISREL
System File from the Add/Read Variables dialog box and use the Browse button to locate
the file control.lsf in the tutorial folder. Click OK when done to return to the Labels dialog
box. Use the Add Latent Variables button to insert the names Ses and Ability.
LISREL Examples Guide 83
Click the Next button to go to the Data dialog box. Since a *.lsf file was selected in the
previous step, the Data dialog box shows the File type: as LISREL System Data File and the
filename as control.lsf. Use the Groups: drop-down list box to select Group2=Head Start.
Once this is done, use the Browse button to locate the file experim.lsf. Click Open to
return to the Data dialog box.
A more detailed description of this process is given in preceding sections of this guide.
Note that no relationships are given for Group2 under the Relationships keyword. This
implies that all parameters are constrained to be equal across groups.
Click the Run LISREL icon to create an output file and the path diagram shown below.
LISREL Examples Guide 86
Since it is not realistic to assume equal error variances across groups, we can set each
error variance free by moving the mouse to the appropriate arrow (e.g. MRT 0.96).
Right click to obtain the menu below and select the Free option. Proceed in a similar way
to free the error variances of ITPA, MOTHEDUC, FATHEDUC, FATHOCC and FAMILINC as
well as the covariance (5.45) between MOTHEDUC and FATHEDUC.
A portion of the SIMPLIS project file showing the resultant relationships for group 2 is
shown below.
Click the Run LISREL icon button to produce the path diagram shown below.
When the missing value code, sample size and raw data file information are read in, the
EM algorithm for estimating the means and covariances under the unrestricted model is
started. From this portion of the output a percentage of 14.61% missing cases are reported
for group 1 and 9.92% for group 2.
LISREL Examples Guide 88
Note that the estimated means and covariances are used to obtain starting values for the
FIML procedure. In addition, a 2ln L value is reported for each group. This value is
minus two times the log likelihood value obtained when no restrictions are imposed on
means and covariance matrices. From the output it follows that the sum of the 2ln L
values for the groups equals 11358.595 + 12716.065 = 24074.660.
The FIML procedure converged in 6 iterations. Portions of the output file are given below.
Number of Iterations = 6
Measurement Equations
The FIML 2 is obtained as the difference between -2 ln L (24105.18) for the fitted model
and -2 ln L for the unrestricted model and equals 31.872.
Step 1
If the data are not available as a LISREL system data file (*.lsf) yet, use the Import Data in
Free Format or Import External Data in Other Formats options from the File menu to create
a *.lsf file.
Step 2
Use this *.lsf file to compute the desired sample covariance or correlation matrix to
which the structural equation model should be fitted. This may be done by running the
appropriate PRELIS syntax file or by using the Output Options option from the Statistics
menu. Either action will result in the creation a LISREL data summary file (*.dsf). A
*.dsf file contains all the data information that LISREL requires to fit the structural
equation model to the data.
Step 3
LSFfile <filename>.LSF
after the Relationships paragraph where <filename> denotes the path and name of the *.lsf
file. The System File command replaces the Observed Variables paragraph and the Sample
Size line.
SY = <filename>.DSF
LS = <filename>.LSF
command line to specify the *.lsf file. The SY command replaces the LA and the DA
commands.
Chow (2000) used five indicators of self esteem (Selfest) and four indicators of
depression (Depress) to formulate a measurement model for the latent variables Self
Esteem and Depression. A path diagram of this measurement model is shown below.
The nine indicators were observed for a random sample size of 230 college graduates.
The resulting raw data are listed in the PRELIS System File depression.lsf, located in the
tutorial folder. A portion of the spreadsheet is shown below.
SY= Depress.lsf
OU MA=CM XM XB XT
The SIMPLIS syntax file depress.spl in the tutorial folder is used to compute the latent
variable scores for the latent variables Self Esteem and Depression. The contents of this
file are listed below.
LISREL Examples Guide 92
If LISREL is executed, a LISREL system data file depressionnew.lsf is created with the
latent variable scores as shown below.
The LISREL syntax file corresponding to the SIMPLIS syntax file depress.spl is shown
below.
The data set used in this example forms part of the data library of the Multilevel Project
at the University of London, and comes from the Junior School Project (Mortimore et al,
1988). Mathematics and language tests were administered in three consecutive years to
more than 1000 students from 50 primary schools, which were randomly selected from
primary schools maintained by the Inner London Education Authority. The data set is
stored in the tutorial folder as an SPSS for Windows file named jsp2.sav.
It is convenient to work with LISREL system data files (*.lsf) since LISREL can read the
variable names, the number of variables, the number of records and other relevant
information directly from these files. It is therefore advantageous to convert files from
other software packages to the *.lsf format.
Enter the name jsp2.lsf in the File name string field. By clicking the Save button a LISREL
system data file is created and displayed in the form of a data spreadsheet.
Although no missing value codes were assigned in jsp2.sav, data values of -9 indicate
missing values and can be defined as such by selecting the Define Variables option from
the Data menu.
Click on MATH1 (or any other variable) to select it. Click Missing Values to obtain the
Missing Values dialog box. Enter the value -9.0 in the Global Missing Value edit box and
change the method of deletion from listwise to pairwise. The pairwise option ensures that
recoding and computing of variables do not change the number of cases.
Select the Title and Comments option from the Setup menu to open the Title and
Comments dialog box. Enter the title Multilevel CFA model for Numeric and Verbal Ability in
the Title string field to produce the following Title and Comments dialog box.
Click Next to open the Groups dialog box. Enter the label Group1: Between Schools in the
first string field. Use the down arrow key to create a string field for the second group.
Enter the label Group2: Within Schools in the second string field to produce the following
Groups dialog box.
Use the Browse button to select the file jsp2.lsf in the tutorial folder to produce the
following Add/Read Variables dialog box. Click OK to return to the Labels dialog box.
Click Add Latent Variables to open the Latent Variables dialog box. Enter the label
NABILITY for Numeric Ability to produce the following dialog box.
Click OK to return to the path diagram window. Click and drag the observed variables
MATH1, MATH2, MATH3, ENG1, ENG2 and ENG3 one by one into the path diagram
window. Also click and drag the latent variables NABILITY and VABILITY one by one into
the path diagram window to produce the following display.
Use the one-directional arrow on the Draw toolbar to insert paths from NABILITY to
MATH1, MATH2 and MATH3 and also to insert paths from VABILITY to ENG1, ENG2 and
ENG3 as shown below.
Note:
Once this arrow is selected, move the mouse to within an ellipse representing a latent
variable. With the left mouse button down, drag the arrow to an observed variable.
Release the mouse button when the arrow is in the rectangle representing the observed
variable.
Select the Build SIMPLIS Syntax option from the Setup menu to produce the text editor
window shown overleaf. Insert the command line $CLUSTER SCHOOL after the Raw Data
from File command:
In the Relationships paragraph of the Within Schools group, insert the following SIMPLIS
commands
Click the Run LISREL icon button on the main toolbar to produce the path diagram for the
between schools group shown below: