Learn R Programming

ThreeWay (version 1.1.3)

pcamean: PCA of the mean matrix

Description

Performs Principal Component Analysis (PCA) of the mean matrix aggregated over mode number indicated by aggregmode.

Usage

pcamean(X, n, m, p, laba, labb, labc)

Value

A list including the following components:

Y

An object of class matrix containing the mean matrix

ev

A vector containing the eigenvalues of Y

A1

Component matrix for the A mode based on varimax rotation of loadings

B1

Component matrix for the B mode based on varimax rotation of loadings

C1

Component matrix for the C mode based on varimax rotation of loadings

A2

Component matrix for the A mode based on oblique ‘HKIC’ (Harris-Kaiser Independent Cluster) orthomax rotation of loadings

B2

Component matrix for the B mode based on oblique ‘HKIC’ (Harris-Kaiser Independent Cluster) orthomax rotation of loadings

C2

Component matrix for the C mode based on oblique ‘HKIC’ (Harris-Kaiser Independent Cluster) orthomax rotation of loadings

Arguments

X

Matrix (or data.frame coerced to a matrix) of order (n x mp) containing the matricized array (frontal slices)

n

Number of A-mode entities

m

Number of B-mode entities

p

Number of C-mode entities

laba

Optional vector of length n containing the labels of the A-mode entities

labb

Optional vector of length m containing the labels of the B-mode entities

labc

Optional vector of length p containing the labels of the C-mode entities

Author

Maria Antonietta Del Ferraro mariaantonietta.delferraro@yahoo.it
Henk A.L. Kiers h.a.l.kiers@rug.nl
Paolo Giordani paolo.giordani@uniroma1.it

References

H. Kaiser (1958). The varimax criterion for analytic rotation in factor analysis. Psychometrika 23:187--200.
C. Harris \& H. Kaiser (1964). Some mathematical notes on three-mode factor analysis. Psychometrika 29:347--362.

Examples

Run this code
data(TV)
TVdata=TV[[1]]
labSCALE=TV[[2]]
labPROGRAM=TV[[3]]
labSTUDENT=TV[[4]]
# permutation of the modes so that the A-mode refers to students
TVdata <- permnew(TVdata, 16, 15, 30)
TVdata <- permnew(TVdata, 15, 30, 16)
if (FALSE) {
# PCA on the mean matrix
TVpcamean <- pcamean(TVdata, 30, 16, 15, labSTUDENT, labSCALE, labPROGRAM)
# PCA on the mean matrix (when labels are not available)
TVpcamean <- pcamean(TVdata, 30, 16, 15)
}

Run the code above in your browser using DataLab