pblocks: exact probability for SKT/RKT with blocks (seasons/sites)

View source: R/pblocks.R

pblocksR Documentation

exact probability for SKT/RKT with blocks (seasons/sites)

Description

upper tail exact probability for a positive value of S in presence of up to 6 blocks. With more blocks exact probability is not useful, as the normal approximation is precise even with as low as 3 points for 12 seasons (see Hirscvh 1982). Block lenght can be different among blocks. The exact probability is obtained following Hirsch (1982), by enumerating all possible permutations and combinations of Si (the S of a single block) for all the blocks, summing the Si's, multiplying the independent probabilities, and adding the probabilities of all of the Si sequences that sum to each particular value of S. pblocks function is called by rkt. rkt will double the retruned value to obtain the 2-sided probability.

Usage

pblocks(BL,S)

Arguments

BL

a vector of 6 integers representing the length of the blocks, in decreasing order; if there are less than 6 blocks, the remaining values should be set to zero.

S

the value of S of the SKT/RKT test

Value

the upper tail exact probability of S, based on the block length.

Note

used by rkt

Author(s)

Aldo Marchetto

References

Hirsch R.M., Slack J.R., Smith R.A. 1982. Techniques of trend ananlyis for monthly water quality data. Water Resources Research 18, 107-121

See Also

rkt

Examples

pblocks(c(4,4,4,0,0,0),4)

rkt documentation built on Sept. 16, 2026, 5:07 p.m.