LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 8 Sep 2005 11:30:36 +0930
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Kylie Lange <>
Subject:      importing PRELIS correlations
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

(Apologies for the dodgy formatting, hopefully this will read better)

Hi all,

I have a user who has is calculating polychoric correlations is PRELIS (part of LISREL) and then using those as a correlation matrix input to SPSS' factor analysis procedure. At the moment he takes the text output from PRELIS and uses Excel to get it into SPSS' matrix format. This is fiddly for large correlation matrices so he would ideally like a way to directly import the text output into SPSS via syntax.

The PRELIS output comes as a single line (no line breaks). For example:

0.10000D+01 -0.25278D-02 0.10000D+01 0.23427D+00 -0.58275D-01 0.10000D+01 0.48736D-01 0.54267D-01 -0.21431D+00 0.10000D+01

It also uses PRELIS' own version of scientific notation, with 0.10000D+01 = 1.0000. The PRELIS output represents the lower half of the correlation matrix, reading each row from left to right. So -0.25278D-02 is the correlation between x2 and x1. The ideal end result would be a SPSS data file with the same structure that the below syntax gives:

matrix data variables = rowtype_ x1 x2 x3 x4. begin data mean 0.0 0.0 0.0 0.0 0.0 0.0 stddev 1.0 1.0 1.0 1.0 1.0 1.0 n 100 100 100 100 100 100 corr 1 -0.0025278 0.23427 0.048736 corr -0.0025278 1 -0.058275 0.054267 corr 0.23427 -0.058275 1 -0.21432 corr 0.048736 0.054267 -0.21432 1 end data.

Does anyone have any suggestions of where to start with this?

Thanks, Kylie.

Back to: Top of message | Previous page | Main SPSSX-L page