normalize_fa {lazy.fa}R Documentation

Normalization of F and A in PCA of FA model

Description

Normalization of F and A in PCA of FA model

Usage

normalize_fa(F, A)

Arguments

F

n x ndim matrix of factor scores

A

nvar x ndim matrix of factor loadings

Details

The resulting matrices satisfy:
t(F)%*%F = n I, and t(A)%*%A = diagonal

Value

A list of normalizd F and A

Examples


seed <- 1701
set.seed(seed)
n <- 200; nvar <- 9
ndim <- 3

F <- matrix(rnorm(n*ndim),n,ndim)
F <- scale( F, center=TRUE )
A <- matrix(rnorm(nvar*ndim), nvar,ndim)
Y <- F%*%t(A)
rss <- ssq(Y-F%*%t(A))
stat=mandd( F )
Print(rss, stat$cov)
Print(t(F)%*%F, t(A)%*%A, fmt="8.4")

FA <- normalize_fa( F, A )
F1 <- FA$F; A1 <- FA$A
rss1 <- ssq(Y-F1%*%t(A1))
stat1=mandd( F1 )
Print(rss1, stat1$cov)
Print(t(F1)%*%F1, t(A1)%*%A1, fmt="8.4")


[Package lazy.fa version 0.1.4 Index]