3WayPack: Program Descriptions
The Progam suite 3WayPack can be downloaded from this website
3WayPack Program.
It is not yet the final version. Some minor details are being corrected and tested.
In case of difficulties, please contact Pieter Kroonenberg: kroonenb at fsw.leidenuniv.nl.
CONTENTS
- PREPROC3: Three-way data preprocessor;
- TUCKALS2: Three-mode principal component analysis with extended core matrix;
- TUCKALS3: Three-mode principal component analysis with complete core matrix;
- TRILIN: Parallel factor analysis (PARAFAC);
- ANACORP1: Three-mode correspondence analysis (Part 1);
- PROCRUS: Generalised Procrustes analysis;
- MIXCLUS3: Three-mode mixture method of clustering;
- T3COVAR: Three-mode analysis of multi-mode covariance matrices;
- SIMULCOMP: Simultaneous component analysis.
- POSTPROC, the output processor of three-way programs:
- RESIDUAL, computation of residuals and construction of perfect three-mode data;
- T3ROTATE, rotations of component matrices and rotations of core and components;
- JOINTPLT, joint plot of two modes given a component of the third mode;
- ANACORP2, second part of three-mode correspondence analysis.
The collection of programs which together constitute 3WayPack (also named TWPack) have been designed for the analysis
of three-way data. Data are considered to be three-way if they can be classified or indexed by three
types of entities. An obvious example is a data set consisting of scores of (1) subjects on several
(2) variables measured at different (3) points in time.
The word mode refers the content of a way, e.g., a set of correlation matrices of variables
by variable by occasions is a three-way two-mode data block. Two of the ways refer to same attributes (= variables).
Three main most developed programs of 3WayPack are TUCKALS3, TUCKALS2, and TRILIN for some form of
three-mode component analysis. More recent programs are those
for three-mode correspondence analysis ANACOR3, three-mode analysis for multi-mode covariance
matrices T3COVAR, Procrustes analysis PROCRUS, simultaneous component analysis SIMULCOMP, and three-mode mixture
method of clustering MIXCLUS3. These programs, written in Fortran95 and compatible with Windows
64-bits processing, form the backbone of the package and will be collectively referred to as the
analysis programs. The interface program is written in Pascal. In addition, there is a
preprocessing program PREPROC3 (or PP3), which also performs a three-way analysis of variance,
and there are three Fortran95 programs which carry out the actual postprocessing, RESIDUAL
(calculation of residuals and perfectly fitting data), T3ROTATE (rotations of core and components), and
JOINTPLT (construction and plotting of joint biplots for two modes given a component of the third
mode). These three programs will be referred to as the postprocessing programs. The three-mode
correspondence analysis program consists of both an "analysis" part (ANACORP1)
and a "postprocessing" part (ANACORP2).
State of the Interface and analysis program
Especiallly the three most developed and used analysis programs (TUCKALS3, TUCKALS2, and TRILIN) have been used frequengly,
and are tested more thoroughly than the other programs. Least tested is the interface which has undergone several revamps.
This means that once in a while an (undesirable) error may occur for which we apologise.
If you come across any error or uncertainty, please inform me, and I will try to correct it.
However, my experience lies in Fortan programming, rather than Pascal programming which was the language of the Interface.
Unfortunately, my friend and colleague Yves de Roo who did the Pascal programming is no longer with us. In intent to take over his tasks,
but it will not be easy. WGnuPlot has further developed whihc caused additional problems. Also in this aspect I will do my best to
correct any errors.
3WayPack Interface
3WayPack has a user interface to simplify the use of the individual analysis and post processing programs
The INTERFACE3 of 3WayPack is the control centre for all analyses. It has a menu part to specify all options
After setting up the options, INTERFACE3 will write the set-up file to disk
and start an analysis program. When the analysis program is finished INTERFACE3 retake control and
it will offer the opportunities to view and/or print the output,
to create quality graphs, and to start an internal browser. In addition, the
interface can call the postprocessing programs to further enhance the analysis, such as rotating
components and/or the core array, calculating residuals, and constructing joint biplots.
Availability
The program suite is designed to be run in a Windows environment.
The analysis programs and postprocessing programs are Win64 programs, and can use all
available memory. Because the Fortran programs can also run independently of the Pascal menu
program, they can be compiled for other systems, and used as stand-alone programs. In such a case
several input files have to be called according to the specifications in the manuals of the
programs.
Copies of the software and the manuals can be downloaded from this site of the Three-Mode Company
Author of the analysis and postprocessing programs:
Pieter M. Kroonenberg,
Faculty of Social and Behavioural Sciences, Leiden University,
The Three-Mode Company, Leiden, The Netherlands.
Email: kroonenb at fsw.leidenuniv.nl
The interface was primalrily developed by Yves de Roo († December 2021)
PREPROC3 is a program for preprocessing three-way data. It is, however,
also a proper three-way program in its own right; for instance, it can
perform three-way analysis of variance with one observation per cell,
estimate missing data, etc.
The program can perform functions such as
1. Swapping the dimensions of a three-way array;
2. Estimating missing data according to Anova models;
3. Centring three-way arrays;
4. Normalising three-way arrays;
5. Printing all means from a three-way Anova model;
6. Computing and printing three-way Anova summary tables.
If PREPROC3 changes the data in any way, it creates a new data file in
the same directory where the original data file resides. Simultaneously,
PREPROC3 also creates a data definition file for this data set, so that
the modified data can directly be used in 3WayPack. A new data file is
created whenever the options 1, 2, 3, 4 from the above list are
requested.
TUCKALS3 is a program for three-mode principal components with dimension
reduction along all three ways. Its core matrix will have as its
dimensions the number of components of each of the three ways (i.e.
PxQxR). The program can also be used for a simple singular value
decomposition if K=1, and a weighted (or replicated) principal component
analysis if R=1.
TUCKALS2 is a program for three-mode principal components with dimension
reduction along two of the three ways. Its extended core matrix will
have as its dimensions the number of components of way 1 and way 2, and
the number of levels of way 3 (i.e. PxQxK). The program can also be used
for a simple singular value decomposition if K=1, or can be used to fit
the IDIOSCAL model, if the input is a set of K symmetric matrices with
(squared) distances.
TRILIN is a program for three-mode component analysis without a core
matrix. It fits the parallel factor analysis model (PARAFAC), which is
also called the canonical decomposition model (CANDECOMP). The PARAFAC
model is an extension of the principal component model in which the
components are equal for each level of the third way except for
proportionality constants. It can be seen as a Tucker2 model with
diagonal core, or a Tucker3 model with superdiagonal core given that all
ways have equal numbers of components. The program can also be used for
the INDSCAL model, if the input is a set of K symmetric matrices with
(squared) distances.
ANACORP1 is a program for three-way correspondence analysis.
It is not a stand-alone program but is embedded in the TUCKALS3 program and
it computes the components (singular vectors) for each of the ways.
The input for the program is a three-way contingency table.
The derived components are further processed and scaled in the Postproc program
ANACORP2.
PROCRUS performs a generalised Procrustes analysis on a standard three-way data set.
MIXCLUS is a set of two cluster analysis programs which are based on
the mixture method of clustering model developed by
Kaye E. Basford.
T3Covar is the three-mode equivalent of a Linear structural equation model for
covariance matrices, such as multi-trait multi-method matrices. Such a matrix consists
an (I x J) by (I x J) covariance matrix where J levels of mode 2 are nested with the I levels
of mode 1, and the data are provided by K subjects (mode 3).
SIMULCOMP is a program to deal with multiset data. Such data consist of K matrices where each
has the same variables but K samples supplying the data consist of different subject.
POSTPROC, the output processor of three-way programs
With the programs in POSTPROC, the output of the three-way analysis
programs can be analysed further. The components and core matrix
(TUCKALS) or component weights (TRILIN), and the overall sum of squares
are written to the file JOBNAME.cpc by the three-way analysis
programs. This information is the basis for the three postprocessing
programs T3ROTATE (rotation/transformation of component matrices),
RESIDUAL (computations of residuals, and residuals versus fitted data plots), and
JOINTPLT (joint (bi)plots of components of two ways given a component of
the third), which can be selected from the type of POSTPROC screen.
ANACORP2 processes the information from ANACORP1 obtained through TUCKALS3 program
to create the proper parameters of three-mode correspondence analysis.
If you want to use more than one postprocessing program, you have to select
the postprocessing option in the main menu screen of the relevant
three-way analysis program every time. No rotations or joint plots can
be made for output from TRILIN, as such operations are incompatible with
the Parafac model fitted by TRILIN.
This program will rotate the components of any of the three ways. The
rotations (or rather) transformations available are
1. Varimax rotation on the orthonormal components (equivalent to the
Harris-Kaiser cluster rotation);
2. Oblimin transformation of the orthonormal components;
3. Optimally constant first component. This option can sometimes be used
to facilitate interpretation, especially of reference modes for joint
plots.
This program will calculate standardized residuals and plot these
against the fitted data. You may choose to do the plotting per frontal
slice or for the entire data set. This program also provides an option
to write the residuals and/or the fitted data to a file. Note
that the fitted data are such that they perfectly fit the model, and
thus can be used for simulation etc.
This program constructs joint (bi)plots for two modes given the third,
i.e., the reference mode. In addition, it can compute the
coordinates for interactive biplots.
The components in the output of ANACORP2 are scaled in such a way that they
correspond to the components in standard correspondence analysis.
TRIADIC is a program for three-mode component analysis without a core
matrix. The program fits the Parallel factor analysis model (PARAFAC),
but it uses a non-standard algorithm, so-called triadic fitting.
This procedure allows for easy inclusion of constraints on the components.
Unfortunately, it is not yet available for general use, but it is hoped
that it will be included in a next release of 3WayPack.
|
Faculty of Social and Behavioural Sciences |
TOP |
P.M. Kroonenberg
Faculty of Social and Behavioural Sciences, Leiden University
The Three-Mode Company, Leiden, The Netherlands
E-mail: kroonenb at fsw.leidenuniv.nl
Created: 4-04-1997;