br.test | R Documentation |
Performes the Buishand range test for change-point detection of a normal variate.
br.test(x, m = 20000)
x |
a vector of class "numeric" or a time series object of class "ts" |
m |
numeric, number of Monte-Carlo replicates, defaults to 20000 |
Let X
denote a normal random variate, then the following model
with a single shift (change-point) can be proposed:
x_i = \left\{
\begin{array}{lcl}
\mu + \epsilon_i, & \qquad & i = 1, \ldots, m \\
\mu + \Delta + \epsilon_i & \qquad & i = m + 1, \ldots, n \\
\end{array} \right.
with \epsilon \approx N(0,\sigma)
. The null hypothesis \Delta = 0
is tested against the alternative \Delta \ne 0
.
In the Buishand range test, the rescaled adjusted partial sums are calculated as
S_k = \sum_{i=1}^k \left(x_i - \hat{x}\right) \qquad (1 \le i \le n)
The test statistic is calculated as:
Rb = \left(\max S_k - \min S_k\right) / \sigma
.
The p.value
is estimated with a Monte Carlo simulation
using m
replicates.
Critical values based on m = 19999
Monte Carlo simulations
are tabulated for Rb / \sqrt{n}
by Buishand (1982).
A list with class "htest" and "cptest"
data.name |
character string that denotes the input data |
p.value |
the p-value |
statistic |
the test statistic |
null.value |
the null hypothesis |
estimates |
the time of the probable change point |
alternative |
the alternative hypothesis |
method |
character string that denotes the test |
data |
numeric vector of Sk for plotting |
The current function is for complete observations only.
T. A. Buishand (1982), Some Methods for Testing the Homogeneity of Rainfall Records, Journal of Hydrology 58, 11–27.
G. Verstraeten, J. Poesen, G. Demaree, C. Salles (2006), Long-term (105 years) variability in rain erosivity as derived from 10-min rainfall depth data for Ukkel (Brussels, Belgium): Implications for assessing soil erosion rates. Journal of Geophysical Research 111, D22109.
efp
sctest.efp
data(Nile)
(out <- br.test(Nile))
plot(out)
data(PagesData) ; br.test(PagesData)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.