brown.method: Brown's Method on the Number of Records

View source: R/brown.method.R

brown.methodR Documentation

Brown's Method on the Number of Records

Description

Performs Brown's method on the p-values of N.test as proposed by Cebrián, Castillo-Mateo and Asín (2022). The null hypothesis of the classical record model (i.e., of IID continuous RVs) is tested against the alternative hypothesis.

Usage

brown.method(
  X,
  weights = function(t) 1,
  record = c(FU = 1, FL = 1, BU = 1, BL = 1),
  alternative = c(FU = "greater", FL = "less", BU = "less", BL = "greater"),
  correct = TRUE
)

Arguments

X

A numeric vector, matrix (or data frame).

weights

A function indicating the weight given to the different records according to their position in the series, e.g., if function(t) t-1 then \omega_t = t-1.

record

Vector of length four. Each element is a logical indicating if the p-value of the test for forward upper, forward lower, backward upper and backward lower are going to be used, respectively. Logical values or 0,1 values are accepted.

alternative

Vector of length four. Each element is one of "greater" or "less" indicating the alternative hypothesis in every test (for forward upper, forward lower, backward upper and backward lower records, respectively). Under the alternative hypothesis of linear trend the FU and BL records will be greater and the FL and BU records will be less than under the null, but other combinations (e.g., for trend in variation) could be considered.

correct

Logical. Indicates, whether a continuity correction should be applied in N.test; defaults to TRUE.

Details

The test is implemented as given by Cebrián, Castillo-Mateo and Asín (2022), where the p-values p^{(FU)}, p^{(FL)}, p^{(BU)}, and p^{(BL)} of the test N.test for the four types of record are used for the statistic:

-2 \left(\log(p^{(FU)}) + \log(p^{(FL)}) + \log(p^{(BU)}) + \log(p^{(BL)})\right).

Any other combination of p-values for the test is also allowed (see argument record).

According to Brown's method (Brown, 1975) for the union of dependent p-values, the statistic follows a c \chi^2_{df} distribution, with a scale parameter c and df degrees of freedom that depend on the covariance of the p-values. This covariances are approximated according to Kost and McDermott (2002):

\textrm{COV}\left(-2 \log(p^{(i)}), -2 \log(p^{(j)})\right) \approx 3.263 \rho_{ij} + 0.710 \rho_{ij}^2 + 0.027 \rho_{ij}^3,

where \rho_{ij} is the correlation between their respective statistics.

Power studies indicate that this and foster.test using all four types of record and linear weights are the two most powerful records tests for trend detection against a linear drift model. In particular, this test is more powerful than Mann-Kendall test against alternatives with a linear drift in location in series of generalised Pareto variables and some cases of the generalised extreme value variables (see Cebrián, Castillo-Mateo and Asín, 2022).

Value

A "htest" object with elements:

statistic

Value of the chi-square statistic (not scaled).

parameter

Degrees of freedom df and scale parameter c.

p.value

P-value.

method

A character string indicating the type of test performed.

data.name

A character string giving the name of the data.

Author(s)

Jorge Castillo-Mateo

References

Brown M (1975). “A Method for Combining Non-Independent, One-Sided Tests of Significance.” Biometrics, 31(4), 987-992. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2529826")}.

Cebrián AC, Castillo-Mateo J, Asín J (2022). “Record Tests to Detect Non Stationarity in the Tails with an Application to Climate Change.” Stochastic Environmental Research and Risk Assessment, 36(2), 313-330. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s00477-021-02122-w")}.

Kost JT, McDermott MP (2002). “Combining Dependent P-Values.” Statistics & Probability Letters, 60(2), 183-190. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/S0167-7152(02)00310-3")}.

See Also

fisher.method, foster.test, N.test

Examples

brown.method(ZaragozaSeries)
brown.method(ZaragozaSeries, weights = function(t) t-1)
brown.method(ZaragozaSeries, weights = function(t) t-1, correct = FALSE)

# Join p-values of upper records
brown.method(ZaragozaSeries, weights = function(t) t-1, record = c(1,0,1,0))
# Join p-values of lower records
brown.method(ZaragozaSeries, weights = function(t) t-1, record = c(0,1,0,1))


RecordTest documentation built on Aug. 8, 2023, 1:09 a.m.