Computes communalities and the standardized factor residual correlation matrix.
COV — NVAR
by NVAR
matrix containing the variance-covariance or correlation matrix.
(Input)
Only the upper triangular part of COV is referenced.
A — NVAR by NF orthogonal factor-loading matrix. (Input)
Y — Vector of length NVAR containing the communalities. (Output)
RESID — NVAR by NVAR matrix containing the normalized residual variance-covariance or correlation matrix. (Output)
NVAR — Number of
variables. (Input)
Default: NVAR = size (COV,1).
LDCOV — Leading
dimension of COV
exactly as specified in the dimension statement in the calling
program. (Input)
Default: LDCOV = size (COV,1).
NF — Number of
factors. (Input)
Default: NF = size (A,2).
LDA — Leading
dimension of A
exactly as specified in the dimension statement in the calling
program. (Input)
Default: LDA = size (A,1).
LDRESI — Leading
dimension of RESID exactly as
specified in the dimension statement in the calling program.
(Input)
Default: LDRESI = size (RESID,1).
Generic: CALL FRESI (COV, A, Y, RESID [,…])
Specific: The specific interface names are S_FRESI and D_FRESI.
Single: CALL FRESI (NVAR, COV, LDCOV, NF, A, LDA, Y, RESID, LDRESI)
Double: The double precision name is DFRESI.
Routine FRESI
computes the communalities and a standardized residual covariance/correlation
matrix for input covariance/correlation matrix COV.
The user must also input the orthogonal (unrotated) factor loadings, A,
obtained from the matrix COV.
Let ai denote the i-th
row of
matrix A.
Then, the communalities are given as
where yi is the i-th communality. The residual covariance/correlation matrix is given by
where sij denotes an element of the covariance/correlation matrix and R = (rij) denotes the residual matrix. Standardization is performed by dividing the rij by
where ui= sii −yi is the unique error variance for the i-th variable. If ui is zero (or slightly less than zero due to roundoff error), ui = 1.0 is assumed and division by zero is avoided.
The following example computes the residual correlation matrix with communalities in a 9-factor problem. The resulting residual correlations do not seem to exhibit any pattern.
USE FRESI_INT
USE WRRRN_INT
IMPLICIT NONE
INTEGER LDA, LDCOV, LDRESI, NF, NVAR
PARAMETER (LDA=9, LDCOV=9, LDRESI=9, NF=3, NVAR=9)
!
REAL A(9,3), COV(9,9), RESID(9,9), Y(9)
!
DATA COV/1.000, 0.523, 0.395,
0.471, 0.346, 0.426, 0.576, 0.434, &
0.639, 0.523, 1.000, 0.479, 0.506, 0.418, 0.462, 0.547,
&
0.283, 0.645, 0.395, 0.479, 1.000,
0.355, 0.270, 0.254, &
0.452, 0.219,
0.504, 0.471, 0.506, 0.355, 1.000, 0.691,
&
0.791, 0.443, 0.285, 0.505, 0.346,
0.418, 0.270, 0.691, &
1.000, 0.679,
0.383, 0.149, 0.409, 0.426, 0.462, 0.254,
&
0.791, 0.679, 1.000, 0.372, 0.314,
0.472, 0.576, 0.547, &
0.452, 0.443,
0.383, 0.372, 1.000, 0.385, 0.680, 0.434,
&
0.283, 0.219, 0.285, 0.149, 0.314,
0.385, 1.000, 0.470, &
0.639, 0.645,
0.504, 0.505, 0.409, 0.472, 0.680, 0.470,
&
1.000/
!
DATA A/.6642, .6888, .4926,
.8372, .7050, .8187, .6615, .4579, &
.7657, -.3209, -.2471, -.3022, .2924, .3148, .3767, -.3960,
&
-.2955, -.4274, .0735, -.1933, -.2224,
-.0354, -.1528, .1045, &
-.0778, .4914,
-.0117/
!
CALL FRESI (COV, A, Y, RESID)
!
CALL WRRRN ('Communalities', Y, 1, NVAR, 1)
CALL WRRRN ('Residuals', RESID)
END
Communalities
1
2
3
4
5
6
7 8
0.5495
0.5729 0.3834 0.7877 0.6195
0.8231 0.6005 0.5385
9
0.7691
Residuals
1 2
3 4
5 6
7 8
9
1 1.000 0.001 -0.024 0.037
-0.024 -0.016 0.036 -0.002 -0.018
2
0.001 1.000 0.043 -0.017 -0.048
0.041 -0.052 -0.023 0.031
3 -0.024
0.043 1.000 0.064 -0.033 -0.037
-0.022 0.025 -0.013
4 0.037
-0.017 0.064 1.000 0.012
-0.004 0.008 0.017 -0.052
5 -0.024
-0.048 -0.033 0.012 1.000 -0.003
0.075 -0.014 0.007
6 -0.016 0.041
-0.037 -0.004 -0.003 1.000 -0.046
-0.003 0.036
7 0.036 -0.052
-0.022 0.008 0.075 -0.046
1.000 0.008 0.011
8 -0.002
-0.023 0.025 0.017 -0.014 -0.003
0.008 1.000 -0.004
9 -0.018 0.031
-0.013 -0.052 0.007 0.036 0.011
-0.004 1.000
PHONE: 713.784.3131 FAX:713.781.9260 |