Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: Import external correlation matrix

From   Dirk Enzmann <>
Subject   st: AW: Import external correlation matrix
Date   Mon, 14 Jun 2010 12:54:08 +0200

Thanks Martin for you quick and helpful answer!

In case that others will encounter the same problem, here an example on how to use an external correlation matrix for factor analysis. I use -insheet-, -mkmat-, and -matname-. Note that you have to set the numbers of observations also via -set obs-, otherwise -fapara- will yield wrong results:

* ------------------------------------------------

* (hopefully this line will not get broken in the email):
global URL1 "";

* Install -fapara- if necessary:
cap which fapara
if _rc {
net install fapara, from("";)

* Install -sortl- if necessary:
cap which sortl
if _rc {
  ssc install sortl

* Use correlation matrix published in Harman (1976, p. 124)
* Harman, H.H. (1976) Modern Factor Analysis. Chicago, IL (3rd ed.):
*   University of Chicago Press.

insheet using "${URL1}holzingr.cor", clear

mkmat v1-v24, matrix(holzinger)
matname holzinger visual   cubes    paper    flags   general  ///
                  paragrap sentence wordc    wordm   addition ///
                  code     counting straight wordr   numberr  ///
                  figurer  object   numberf  figurew deduct   ///
                  numeric  problemr series   arithmet, explicit
set obs 145

factormat holzinger, n(145) factors(4)
fapara, reps(10000)  // Please wait - it will take some time!
rotate, quartimin oblique
matlist e(r_Phi), format(%7.4f) title("Factor correlation matrix")

* ------------------------------------------------


From: "Martin Weiss" <>
Subject: st: AW: Import external correlation matrix

Just -insheet- the thing and subsequently -mkmat-.


Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Rothenbaumchaussee 33
D-20148 Hamburg, Germany

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index