spearman.test: Spearman test for time series trends

Description Usage Arguments Details Value Author(s) References Examples

View source: R/spearman.R

Description

The function uses the non parametric Spearman test to assess the presence of significant trends in the time series

Usage

1
spearman.test(timeseries, years)

Arguments

timeseries

data frame of the indices time series as it is estimated by the index.ts function

years

vector of the time series year range

Details

In presence of a short trawl survey time series the significance of the trend can be estimated using nonparametric statistical tests as Spearman rho (Cotter, 2009). Spearman's rho is the product-moment correlation between the ranks of paired data. To test for trend, one member of the pair is the time of observation, the other is the observed variable. This is also known as the Hotelling-Pabst test. It appears to be sensitive to monotonic trends.

Value

The function returns the statistics of the Spearman's test.

r

Spearman's correlation coefficient.

p

t statistics.

p

the p-value for the test.

Author(s)

Walter Zupa

References

Cotter J. (2009) A selection of nonparametric statistical methods for assessing trends in trawl survey indicators as part of an ecosystem approach to fisheries management (EAFM). Aquat. Living Resour. 22, 173-185.

Examples

1
2
3
4
5
library(MEDITS)
merge_TATB <- m.TATB(TA,TB,"ARISFOL")
timeseries <- index.ts(merge_TATB, index="abundance", depth_range = c(500,800),
str.scheme=strata_scheme,surf=stratification_scheme, plot=FALSE)
spearman.test(timeseries, years=c(2007,2016))

Example output

           r         t         p
1 -0.5030303 -1.646229 0.1383337

MEDITS documentation built on Dec. 23, 2019, 1:06 a.m.