1. Home
  2. ADDPOINTS directive

ADDPOINTS directive

Adds points for new objects to a principal coordinates analysis.


PRINT = string tokens Printed output required (coordinates, residuals); default * i.e. no printing


NEWDISTANCES = matrices Squared distances of the new objects from the original points
LRV = LRVs Latent roots and vectors from the PCO analysis
CENTROID = diagonal matrices Centroid distances from the PCO analysis
COORDINATES = matrices Saves the coordinates of the additional points in the space of the original points
RESIDUALS = matrices or variates Saves the residuals of the new objects from that space


The input to ADDPOINTS is specified by the first three parameters. The NEWDISTANCES parameter specifies an s×n matrix containing squared distances of the s new units from the n old units. The LRV and CENTROID parameters specify structures defining the configuration of old units; these have usually been produced by a PCO statement.

The PRINT option controls the printed output with settings:

    coordinates to print the coordinates of the new points;
    residuals to print the residual distances of the new units from the coordinates in the space of the old units.

The other parameters can be used to save the results: the COORDINATES parameter allows you to specify an s×k matrix to save the coordinates for the new units, and the residuals can be saved in an s×1 matrix using the RESIDUALS parameter. The value k is determined by the dimensionality of the input coordinates from the preceding PCO statement.

Option: PRINT.


See also

Directives: PCO, PCORELATE.

Commands for: Multivariate and cluster analysis.


" Genstat example PCO-1: Principal coordinates analysis.

  The data for this example (Nathanson J A 1971. An aplication of
  multivariate analysis in astronomy. Applied Statistics 20, 239-249)
  gives squared distances amongst ten types of galaxy: those of an 
  elliptical shape, eight different kinds of spiral galaxy , and 
  irregularly-shaped galaxies. The spiral types vary from those which 
  are mailnly made up of a central core (coded as types SO and SBO) to 
  those that are extremely tenuous (Sc and SBc).

  This example forms an ordination of the ten galaxy types.
  Declare the symmetric data matrix
READ Galaxy
1.87 0
2.24 0.91 0
4.03 2.05 1.51 0
4.09 1.74 1.59 0.68 0
5.38 3.41 3.15 1.86 1.27 0
7.03 3.85 3.24 2.25 1.89 2.02 0
6.02 4.85 4.11 3.00 2.13 1.71 1.45 0
6.88 5.70 5.12 3.72 3.01 2.97 1.75 1.13 0
4.12 3.77 3.86 3.93 3.27 3.77 3.52 2.79 3.29 0 :
PRINT Galaxy
CALCULATE Galaxy = -Galaxy/2

 Carry out the principal coordinates analysis, printing out the latent
 roots and trace, the principal coordinate scores, the distances of each 
 unit from their overall centroid, and the matrix of inter-unit distances.
PCO [PRINT=roots,scores,centroid,distances] Galaxy

  Carry out the analysis once again, printing information for the 8 
  smallest roots only.
PCO [PRINT=residuals,centroid; NROOTS=8; SMALLEST=yes] Galaxy

  Create two different data matrices:

       Gname8 - which holds the data corresponding to the eight spiral
                galaxies. This is created from taking row 2 to column 2,
                to row 9, column 9 of the symmetric matrix Galaxy. 
                Corresponding row labels are supplied.
       Gname2 - which holds the data corresponding to the elliptical and 
                irregularly-shaped galaxies. This is created from taking
                the values in the Galaxy matrix from row 1, columns 2 to 
                9, and row 10, columns 2 to 9. Again, appropriate labels
                are supplied.
TEXT Gname8; !T(SO,SBO,Sa,SBa,Sb,SBb,Sc,SBc)
& Gname2; !T(E,I)
CALCULATE G8 = Galaxy$[!(2...9)]
CALCULATE G2 = Galaxy$[!(1,10); !(2...9)]

  Transform the matrix back to the original scale.

  Perform the analysis for the eight spiral galaxies, saving the latent 
  vectors in the LRV structure L8, and the centroid distances in the
  diagonal matric C8. Their is no need to declare these structures in 
  advance since the PCO will do this automatically.
PCO [PRINT=roots,scores] G8; LRV=L8; CENTROID=C8

  Now add the points for the elliptical and irregularly shaped galaxies
  to the principal coordinate analysis.
ADDPOINTS [PRINT=coordinates,residuals] G2; LRV=L8; CENTROID=C8
Updated on June 20, 2019

Was this article helpful?