cor.test.normalized.ratio.index: Test for association/correlation between nri values and...

cor.testR Documentation

Test for association/correlation between nri values and vector of samples

Description

Test for association between paired samples (with one variable being nri-values), using one of Pearson's product moment correlation coefficient, Kendall's tau or Spearman's rho.

Usage

## S4 method for signature 'Nri'
cor.test(x, y, ...)


Arguments

x

Object of class Nri or numerical vector

y

Object of class Nri or numerical vector

...

Further arguments passed to cor.test

Details

NRI-values may be used as x and/or as y variable. If x and y are NRI-values the number of samples in both datasets must be equal. For additional information on correlation tests see details in cor.test.

Value

Object of class Nri

Author(s)

Lukas Lehnert

See Also

plot, cor.test, glm.nri, lm.nri, getNRI

Examples

data(spectral_data)

## Calculate all possible combinations for WorldView-2-8
spec_WV <- spectralResampling(spectral_data, "WorldView2-8",
                              response_function = FALSE)
nri_WV <- nri(spec_WV, recursive = TRUE)

cortestnri <- cor.test(nri_WV, SI(spec_WV)$chlorophyll)

cortestnri

hsdar documentation built on March 18, 2022, 6:35 p.m.