crossing_rate: Multivariate test

Description Usage Arguments Examples

View source: R/crossing.r

Description

Perform a multivariate rate of change test. This function can also be used for the neighbor test. See https://cdn.ioos.noaa.gov/media/2017/12/qartod_temperature_salinity_manual.pdf for more information.

Usage

1
crossing_rate(x, y, n.dev, n.prior)

Arguments

x

A vector of values.

y

A vector of coincident observations, e.g. from a separate sensor or nearby station.

n.dev

The number of standard deviations to test against.

n.prior

the number of prior observations to use for computing the standard deviation. For example, to compute standard deviations over the previous 25 hours from 15-minute data use n.prior = 100.

Examples

1
2
3
4
5
fake.data1 = c(rnorm(10,10), rnorm(10, 50), rnorm(10, 10))
fake.data2 = rep(10,30)
crossing_rate(fake.data1, fake.data2, c(1.5, 3), 5)
crossing_rate(fake.data2, fake.data1, c(1.5, 3), 5)
crossing_rate(fake.data1, fake.data1, 1.5, 5)

mkoohafkan/wqptools documentation built on May 2, 2021, 8:12 p.m.