Description Objects from the Class Slots Methods Author(s) See Also Examples
A class for online changepoint objects that return more than 1 segmentation. Inherits from ocpt class.
Objects can be created by calls of the form new("ocpt.range", ...)
.
new("ocpt.range", ...)
:creates a new object with class ocpt.range
cpts.full
:Object of class "matrix"
, each row of the matrix is a different segmentation of the data (different set of online changepoints).
pen.value.full
:Object of class "vector"
, each element is the penalty used to create the set of changepoints in the corresponding row of ocpts.full
.
The remaining slots are inherited from the ocpt
class.
sumstat
:Object of class "array"
, a summary statistic matrix of the original data. Inherited from ocpt class.
cpttype
:Object of class "character"
, the type of online changepoint that was identified. Inherited from ocpt class.
method
:Object of class "character"
, the method that was used to search for online changepoints. Inherited from ocpt class.
test.stat
:Object of class "character"
, the test statistic for the analysis of the data. Inherited from ocpt class.
pen.type
:Object of class "character"
, the penalty type specified in the analysis. Inherited from ocpt class.
pen.value
:Object of class "numeric"
, the value of the penalty used in the analysis. Inherited from ocpt class.
minseglen
:Object of class "numeric"
, the minimum segment length (no. of observations between online changepoints) used in the analysis. Inherited from ocpt class.
cpts
:Object of class "numeric"
, vector of optimal online changepoints identified. Inherited from ocpt class.
ncpts.max
:Object of class "numeric"
, maximum number of online changepoint that can be identified. Inherited from ocpt class.
param.est
:Object of class "list"
, list where each element is a vector of parameter estimates, if requested. Inherited from ocpt class.
date
:Object of class "character"
, date and time the online changepoint analysis was run. Inherited from ocpt class.
version
:Object of class "character"
, version number of the package used when the analysis was run. Inherited from ocpt class.
lastchangelike
:Object of class "numeric"
, vector of lenght n containing the likelihood of the optimal segmentation up to each timepoint.
lastchangecpts
:Object of class "numeric"
, vector of length n containing the last changepoint prior to each timepoint.
nchecklist
:Object of class "numeric"
, stores the current number of changepoints detected.
checklist
:Object of class "numeric"
, vector of locations of the potential last changepoint for next iteration (to be updated), max length=(ndone+nupdate).
ndone
:Object of class "numeric"
, length of the time series when analysis begins.
nupdate
:Object of class "numeric"
, length of the time series to be analysed in this update.
cost_func
:Object of class "character"
, the cost function used in PELT.online calculations.
shape
:Object of class "numeric"
, only used when cost_func is the gamma likelihood. Otherwise 1.
signature(object = "ocpt.range")
: retrieves ocpts.full slot
signature(object = "ocpt.range")
: retrieves pen.value.full slot
signature(object = "ocpt.range")
: replaces ocpts.full slot
signature(object="ocpt.range",nocpts=NA)
: creates parameter estimates for the segmentation with nocpts
number of online changepoints. If nocpts=NA then the optimal set of online changepoints according to the set penalty is used.
signature(object = "ocpt.range")
: replaces pen.value.full slot
signature(object="ocpt.range",nocpts=NA,diagnostic=FALSE)
: by default plots the optimal segmentation as for class="ocpt"
. If nocpts is specified then plots the segmentation for nocpts
number of online changepoints. If diagnostic=TRUE
then produces a diagnostic plot to aide selection of the number of changes.
signature(object = "ocpt.range")
: prints details of the ocpt.range object including summary
signature(object = "ocpt.range")
: prints a summary of the ocpt.range object
Andrew Connell, Rebecca Killick
1 2 3 4 5 6 7 8 | showClass("ocpt.range") # shows the structure of the ocpt.range class
# Example of multiple changes in variance at 50,100,150 in simulated normal data
set.seed(1)
x=c(rnorm(50,0,1),rnorm(50,0,10),rnorm(50,0,5),rnorm(50,0,1))
#out=ocpt.var.initialise(x,pen.value=c(log(length(x)),10*log(length(x))))
#print(out) # prints details of the analysis including a summary
#summary(out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.