Description Usage Arguments Details Value Author(s) References Examples
View source: R/testBreakpoint.R
Following the test of Pettitt (1979), a time series is tested for a single, abrupt breakpoint concerning a shift in the mean.
1 | testBreakpoint(x, alpha = 0.05)
|
x |
numeric vector. Missing values are not allowed and it is assumed that the frequency, at which the observation took place, is constant. |
alpha |
real number. Defines the significance level. |
The test by Pettitt (1979) relies on the non-parametric Mann-Whitney U-test for assessing whether two samples are drawn from the same distribution. The null hypothesis H0 is stated as 'no change in level' and the alternative hypothesis HA as 'change in level'; only the two-sided test is implemented here.
List with entries
i |
integer. The index of the most probable breakpoint in |
p.value |
real number. The p-value, i.e. the probability of not
observing a breakpoint at |
k |
real number. k=|U(i)|. |
critical.value |
real number. The value of x for which P(K<x)=1-alpha. |
reject.HO |
logical. Reject the null hypothesis, i.e. k ≥ critical.value? |
u |
numeric vector. U(t) corresponding to the values
in |
Original code provided by Pascal H.
Pettitt, A. N. (1979). "A non-parametric approach to the change-point problem". Applied Statistics.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.