R: Covariance and Correlation between Images

cov.im {spatstat.core} | R Documentation

## Covariance and Correlation between Images

### Description

Compute the covariance or correlation between (the corresponding pixel values in) several images.

### Usage

    cov.im(..., use = "everything", method = c("pearson", "kendall", "spearman"))

### Arguments

`...` | Any number of arguments, each of which is a pixel image (object of class `"im"`). Alternatively, a single argument which is a list of pixel images.
`use` | Argument passed to `cov` or `cor` determining how to handle `NA` values in the data.
`method` | Argument passed to `cov` or `cor` determining the type of correlation that will be computed.

### Details

The arguments `...` should be pixel images (objects of class `"im"`). Their spatial domains must overlap, but need not have the same pixel dimensions.

These functions compute the covariance or correlation between the corresponding pixel values in the images given.

The pixel image domains are intersected, and converted to a common pixel resolution. Then the corresponding pixel values of each image are extracted. Finally the correlation or covariance between the pixel values of each pair of images, at corresponding pixels, is computed.

The result is a symmetric matrix with one row and column for each image. The `[i,j]` entry is the correlation or covariance between the `i`th and `j`th images in the argument list. The row names and column names of the matrix are copied from the argument names if they were given (i.e. if the arguments were given as `name=value`).

Note that `cor` and `cov` are not generic, so you have to type `cor.im`, `cov.im`.

### Value

A symmetric matrix.

### Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

### See Also

`cor`, `cov`

`pairs.im`

### Examples

      cor.im(bei.extra)

[Package spatstat.core version 2.3-1 Index]