Prints a scree diagram and/or a difference table of latent roots (P.G.N. Digby).

### Options

`PRINT` = string tokens |
Printed output (`scree` , `differences` ); default `scre` |
---|---|

`PLOT` = string token |
What to plot in high-resolution graphics (`scree` ); default `scre` |

`TITLE` = text |
Title for the graph; default `*` i.e. none |

`WINDOW` = scalar |
Window to use for the graph; default 1 |

### Parameters

`ROOTS` = LRVs or any numerical structures |
Latent roots to be displayed; if an LRV is supplied the trace will also be extracted from it |
---|---|

`TRACE` = scalars |
Supplies or saves the total of the latent roots |

`DIFFERENCES` = pointers |
Contains 3 variates to save the difference table |

### Description

Procedure `LRVSCREE`

displays a set of latent roots in a convenient form. The input to the procedure is a set of latent roots (`ROOTS`

), either as an LRV or any structure with numerical values. Optionally a scalar (`TRACE`

) can be specified, either to supply or to save the total of the latent roots.

Printed output is controlled by the `PRINT`

option. The setting `scree`

produces a scree diagram, annotated with the latent roots on their original scale and expressed both as per-thousandths of the total and as cumulated per-thousandths. The setting `differences`

prints these quantities as a table, together with the first three differences among the per-thousandth values; i.e. the first difference column gives the differences from each per-thousandth to the next, the second difference column gives differences among the first-difference values, and so on. Large first-difference values indicate latent roots ocurring prior to large declines in the scree diagram. Large second and third differences mark the locations of series of two or more latent roots of similar magnitude, which can be thought of as plateaus on the scree diagram. Large positive, or negative, second differences indicate the first, or last, latent root of a plateau. Large negative third differences occur at the last latent root of one plateau that is followed by another plateau. See the example for illustration.

By default the scree diagram is also plotted in high-resolution graphics but this can be suppressed by setting option `PLOT=*`

. The `TITLE`

option can supply a title for the plot, and the `WINDOW`

option specifies which window is used (by default window 1).

The `DIFFERENCES`

parameter allows a pointer to be specified to contain three variates storing the columns of the difference table.

Options: `PRINT`

, `PLOT`

, `TITLE`

, `WINDOW`

.

Parameters: `ROOTS`

, `TRACE`

, `DIFFERENCES`

.

### Action with `RESTRICT`

Not relevant: `LRVSCREE`

deals primarily with diagonal matrices or LRVs. If the latent roots are supplied in a variate, any restriction on the variate will be ignored.

### See also

Procedure: `QEIGENANALYSIS`

.

Commands for: Multivariate and cluster analysis, Graphics.

### Example

CAPTION 'LRVSCREE example',\ 'Data from Section 3.5.2 of Digby & Kempton (1987).';\ STYLE=meta,plain DIAGONALMATRIX [ROWS=28; VALUES=23.4,16.5,15.6,11.3,10.3, 9.2, 8.4, 6.7,\ 5.7, 4.5, 4.3, 4.0, 2.9, 2.4, 2.0, 1.6,\ 1.1, 1.0, 0.6, 0.3, 0.2, 0.0,-1.0,-1.8,\ -2.1,-2.7,-2.9,-3.7] Eigenval PRINT Eigenval CAPTION 'Use LRVSCREE, saving TRACE' LRVSCREE Eigenval; TRACE=TotEigen "Construct LRV with values from Eigenval and TotEigen" LRV [ROWS=28] L EQUATE Eigenval,TotEigen; L[2,3] LRVSCREE [PRINT=scree,differences] L CAPTION !T('The largest first differences, 59 and 37, correspond',\ 'to the two places where the lines of the scree diagram',\ 'differ by more than a single asterisk.',\ 'The second and third roots are fairly similar in value -',\ 'this ''plateau'' is indicated by the values 51 and -29',\ 'in the column of second differences.',\ 'The 4th - 7th latent roots may be considered to form',\ 'another plateau, marked by the second differences 28',\ 'and -8; the third difference of -57 marks the end of',\ 'the first plateau and the start of the next.')