Description Usage Arguments Details Value References Examples
A technique for robustly, i.e., in the presence of anomalies, detecting single or multiple change points in univariate time series.
1 |
Z |
The input time series. This is either a numeric vector or a data.frame which has 'timestamp' and 'count' components. |
min.size |
The minimum number of observations between change points. |
method |
Method must be one of either 'amoc' (At Most One Change) or 'multi' (Multiple Changes). For 'amoc' at most one change point location will be returned. |
... |
See the details section for information about additional arguments. |
The additional arguments that can be supplied depend upon whether single ('amoc') or multiple ('multi') change point analysis is being performed.
In both cases the following arguments are accepted:
plot:
A flag indicating if a plot of the time series along with the estimated change point, indicated by vertical lines, should also be returned.
xlab:
X-axis label if plotting is enabled.
ylab:
Y-axis label if plotting is enabled.
title:
Plot title if plotting is enabled.
For singe change analysis, the following arguments are accepted:
alpha:
The alpha parameter used to weight the distance between observations. This is a real number in the interval (0,2]. The default value is alpha=2
.
exact:
This flag is for selecting the use of true medians (TRUE
) or approximate medians (FALSE
) when determining change points. The default value is exact=TRUE
.
sig.lvl:
Once a change point is found its statistical significance is determined through a hypothesis test. sig.lvl
specifies the significance for the hypothesis test. The default value is sig.lvl=0.05
.
nperm:
The number of permutations to perform in order to obtain an approximate p-value. If nperm=0
then then permutation test is not
performed. The default value is nperm=0
.
For multiple change analysis, the following arguments are accepted:
degree:
The degree of the penalization polynomial. degree
can take the values 0, 1, and 2. The default value is degree=1
.
beta:
A real numbered constant used to further control the amount of penalization. This is the default form of penalization, if neither (or both) beta
or (and) percent
are supplied this argument will be used. The default value is beta=0.008
.
percent:
A real numbered constant used to further control the amount of penalization. This value specifies the minimum percent change in the goodness of fit statistic to consider adding an additional change point. A value of 0.25 corresponds to a 25% increase. percent
doesn't have a default value.
The returned value is a list with the following components.
loc |
The estimated change point location(s). |
time |
The amount of required processing time, in seconds. |
pval |
The approximate p-value obtained from the permutation test. When |
plot |
A ggplot graphical object if plotting was requested by the user. The supplied image is of the input time series along with the estimated change point location(s). |
Nicholas A. James, Arun Kejariwal, David S. Matteson, "Leveraging Cloud Data to Mitigate User Experience from 'Breaking Bad': The Twitter Approach, 2014
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.