Detects the underlying structure of a three-way array according to the Candecomp/Parafac (CP) model.
CP(data,laba,labb,labc)A list including the following components:
Component matrix for the A-mode
Component matrix for the B-mode
Component matrix for the C-mode
Fit value expressed as a percentage
Matrix of the triple cosines among pairs of components (to inspect degeneracy)
Fit values expressed as a percentage upon convergence for all the runs of the CP algorithm (see CPfunc)
Function values upon convergence for all the runs of the CP algorithm (see CPfunc)
Computation times for all the runs of the CP algorithm (see CPfunc)
Numbers of iterations upon convergence for all the runs of the CP algorithm (see CPfunc)
Fit contributions for the A-mode entities (see CPfitpartitioning)
Fit contributions for the B-mode entities (see CPfitpartitioning)
Fit contributions for the C-mode entities (see CPfitpartitioning)
Bootstrap percentile interval of every element of B (see bootstrapCP)
Bootstrap percentile interval of every element of C (see bootstrapCP)
Bootstrap percentile interval for the goodness of fit index expressed as a percentage (see bootstrapCP)
Component matrix for the A-mode (full data) from split-half analysis (see splithalfCP)
Component matrix for the A-mode (split n.1) from split-half analysis (see splithalfCP)
Component matrix for the A-mode (split n.2) from split-half analysis (see splithalfCP)
Component matrix for the B-mode (full data) from split-half analysis (see splithalfCP)
Component matrix for the B-mode (split n.1) from split-half analysis (see splithalfCP)
Component matrix for the B-mode (split n.2) from split-half analysis (see splithalfCP)
Component matrix for the C-mode (full data) from split-half analysis (see splithalfCP)
Component matrix for the C-mode (split n.1) from split-half analysis (see splithalfCP)
Component matrix for the C-mode (split n.2) from split-half analysis (see splithalfCP)
Component matrix for the A-mode from Principal Component Analysis of mean values (see pcamean)
Component matrix for the B-mode from Principal Component Analysis of mean values (see pcamean)
Component matrix for the C-mode from Principal Component Analysis of mean values (see pcamean)
Component matrix for the A-mode from Principal Component Analysis of mean values (see pcamean)
Component matrix for the B-mode from Principal Component Analysis of mean values (see pcamean)
Component matrix for the C-mode from Principal Component Analysis of mean values (see pcamean)
Vector of length n containing the labels of the A-mode entities
Vector of length m containing the labels of the B-mode entities
Vector of length P containing the labels of the C-mode entities
Matrix of order (n x mp) containing the matricized array (frontal slices) after preprocessing used for the analysis
Array of order n by m by p or matrix or data.frame of order (n x mp) containing the matricized array (frontal slices)
Optional vector of length n containing the labels of the A-mode entities
Optional vector of length m containing the labels of the B-mode entities
Optional vector of length p containing the labels of the C-mode entities
Maria Antonietta Del Ferraro mariaantonietta.delferraro@yahoo.it
Henk A.L. Kiers h.a.l.kiers@rug.nl
Paolo Giordani paolo.giordani@uniroma1.it
J.D. Carroll and J.J. Chang (1970). Analysis of individual differences in multidimensional scaling via an N-way generalization of 'Eckart-Young' decomposition. Psychometrika 35:283--319.
P. Giordani, H.A.L. Kiers, M.A. Del Ferraro (2014). Three-way component analysis using the R package ThreeWay. Journal of Statistical Software 57(7):1--23. http://www.jstatsoft.org/v57/i07/.
R.A. Harshman (1970). Foundations of the Parafac procedure: models and conditions for an 'explanatory' multi-mode factor analysis. UCLA Working Papers in Phonetics 16:1--84.
P.M. Kroonenberg (2008). Applied Multiway Data Analysis. Wiley, New Jersey.
T3, T2, T1
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) {
# interactive CP analysis
TVcp <- CP(TVdata, labSTUDENT, labSCALE, labPROGRAM)
# interactive CP analysis (when labels are not available)
TVcp <- CP(TVdata)
}
Run the code above in your browser using DataLab