Download GRASS 4.2 Reference Manual Section VI

Transcript
r.covar
NAME
r.covar - Outputs a covariance/correlation matrix for user specified raster map layer(s).
(GRASS Raster Program)
SYNOPSIS
r.covar
r.covar help
r.covar [-mrq] map=name[,name,...]
DESCRIPTION
r.covar outputs a covariance/correlation matrix for user- specified raster map layer(s). The output can be printed, or (if run
non-interactively) saved by redirecting output into a file.
The output is an N x N symmetric covariance (correlation) matrix, where N is the number of raster map layers specified on
the command line. For example,
r.covar map=layer.1,layer.2,layer.3
would produce a 3x3 matrix (values are example only):
462.876649
480.411218
281.758307
480.411218
513.015646
278.914813
281.758307
278.914813
336.326645
OPTIONS
The program will be run non-interactively, if the user specifies the names of raster map layers and any desired options on the
command line, using the form
r.covar [-mrq] map=name[,name,...]
where each name specifies the name of a raster map layer to be used in calculating the correlations, and the (optional) flags
-m, -r, and -q have meanings given below. If these flags are not specified on the command line, their answers default to “no”.
Flags:
-m Include zero values in the correlation calculations, due to the mask.
-r
Print out the correlation matrix.
-q Run quietly (without comments on program progress).
Parameters:
map=name[,name,...] Existing raster map layer(s) to be included in the covariance/correlation matrix calculations.
Alternately, the user can simply type r.covar on the command line, without program arguments. In this case, the user will be
prompted for flag settings and parameter values using the standard GRASS parser interface described in the manual entry for
parser.
PRINCIPLE COMPONENTS
This module can be used as the first step of a principle components transformation. The covariance matrix would be input
into a system which determines eigen values and eigen vectors. An NxN covariance matrix would result in N real eigen
values and N eigen vectors (each composed of N real numbers). In the above example, the eigen values and corresponding
eigen vectors for the covariance matrix are:
44