ecp.ocpt-class: Class "ecp.ocpt"

Description Objects from the Class Slots Methods Author(s) See Also Examples

Description

A class for online changepoint objects for the test.stat="ECP" case.

Objects from the Class

Objects can be created by calls of the form new("ecp.ocpt", ...).

new("ecp.ocpt", ...):

creates a new object with class ecp.ocpt

Slots

number:

The estimated number of change points.

estimates:

The location of the change points estimated by the procedure.

GofM:

Goodness of fit Model.

delta:

The window size used to calculate the calculate the complete portion of our approximate test statistic. This also corresponds to one less than the minimum segment size. It is the same as minseglen for PELT.

alpha:

The moment index used for determining the distance between and within segments.

verbose:

A flag indicating if status updates should be printed.

csum:

The cumulative distance sum of all datapoints.

dll:

Sum of within sample distances for left segments.

dlr:

Between sample distance sum using dll and drr.

drr:

Sum of within sample distances for right segments.

left:

A vector which gives the sum of distances before point i at Left(i,0). Left(i,1) is to resolve out of bound errors.

right:

A vector which gives the sum of distances after point i at Right(i,0). Right(i,1) is to resolve out of bound errors.

datalength:

This is the total length of the observations.

functime:

The total amount to time take to estimate the change point locations.

width:

This is the number of changepoints located in the dataset.

cpLoc:

The list of locations of change points estimated by the procedure for different numbers of change points up to K (the maximum number of changepoints the user wishes to search for).

sumstat:

Object of class "array", a summary statistic for the the original data.

cpttype:

Object of class "character", the type of online changepoint that was identified.

method:

Object of class "character", the method that was used to search for changepoints.

test.stat:

Object of class "character", the test statistic for the analysis of the data.

pen.type:

Object of class "character", the penalty type specified in the analysis.

pen.value:

Object of class "numeric", the value of the penalty used in the analysis.

minseglen:

Object of class "numeric", the minimum segment length (no. of observations between changepoints) used in the analysis.

cpts:

Object of class "numeric", vector of online changepoints identified.

ncpts.max:

Object of class "numeric", maximum number of online changepoint that can be identified.

param.est:

Object of class "list", list where each element is a vector of parameter estimates, if requested.

date:

Object of class "character", date and time the changepoint analysis was run.

version:

Object of class "character", version number of the package used when the analysis was run.

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.

Methods

ecp.ocpts

signature(object = "ecp.ocpt"): retrieves ecp.ocpts slot

number

signature(object = "ecp.ocpt"): retrieves number slot

estimates

signature(object = "ecp.ocpt"): retrieves estimates slot

GofM

signature(object = "ecp.ocpt"): retrieves GofM slot

delta

signature(object = "ecp.ocpt"): retrieves delta slot

alpha

signature(object = "ecp.ocpt"): retrieves alpha slot

verbose

signature(object = "ecp.ocpt"): retrieves verbose slot

csum

signature(object = "ecp.ocpt"): retrieves csum slot

dll

signature(object = "ecp.ocpt"): retrieves dll slot

dlr

signature(object = "ecp.ocpt"): retrieves dlr slot

drr

signature(object = "ecp.ocpt"): retrieves drr slot

left

signature(object = "ecp.ocpt"): retrieves left slot

right

signature(object = "ecp.ocpt"): retrieves right slot

datalength

signature(object = "ecp.ocpt"): retrieves datalength slot

functime

signature(object = "ecp.ocpt"): retrieves time slot

width

signature(object = "ecp.ocpt"): retrieves width slot

cpLoc

signature(object = "ecp.ocpt"): retrieves csum slot

number<-

signature(object = "ecp.ocpt"): replaces number slot

estimates<-

signature(object = "ecp.ocpt"): replaces estimates slot

GofM<-

signature(object = "ecp.ocpt"): replaces GofM slot

delta<-

signature(object = "ecp.ocpt"): replaces delta slot

alpha<-

signature(object = "ecp.ocpt"): replaces alpha slot

verbose<-

signature(object = "ecp.ocpt"): replaces verbose slot

csum<-

signature(object = "ecp.ocpt"): replaces csum slot

dll<-

signature(object = "ecp.ocpt"): replaces dll slot

dlr<-

signature(object = "ecp.ocpt"): replaces dlr slot

drr<-

signature(object = "ecp.ocpt"): replaces drr slot

left<-

signature(object = "ecp.ocpt"): replaces left slot

right<-

signature(object = "ecp.ocpt"): replaces right slot

datalength<-

signature(object = "ecp.ocpt"): replaces datalength slot

functime<-

signature(object = "ecp.ocpt"): replaces time slot

width<-

signature(object = "ecp.ocpt"): replaces width slot

cpLoc<-

signature(object = "ecp.ocpt"): replaces cpLoc slot

summary

signature(object = "ecp.ocpt"): prints a summary of the ecp.ocpt object

ocpts

signature(object = "ocpt"): retrieves ocpts slot

cpttype

signature(object = "ocpt"): retrieves ocpttype slot

sumstat

signature(object = "ocpt"): retrieves matrix version of sumstat slot

test.stat

signature(object = "ocpt"): retrieves test.stat slot

ncpts.max

signature(object = "ocpt"): retrieves ncpts.max slot

method

signature(object = "ocpt"): retrieves method slot

minseglen

signature(object = "ocpt"): retrieves minseglen slot

param.est

signature(object = "ocpt"): retrieves param.est slot

pen.type

signature(object = "ocpt"): retrieves pen.type slot

pen.value

signature(object = "ocpt"): retrieves pen.value slot

cpts<-

signature(object = "ocpt"): replaces cpts slot

cpttype<-

signature(object = "ocpt"): replaces cpttype slot

sumstat<-

signature(object = "ocpt"): replaces sumstat slot

test.stat<-

signature(object = "ocpt"): replaces test.stat slot

ncpts.max<-

signature(object = "ocpt"): replaces ncpts.max slot

method<-

signature(object = "ocpt"): replaces method slot

minseglen<-

signature(object = "ocpt"): replaces minseglen slot

param.est<-

signature(object = "ocpt"): replaces param.est slot

pen.type<-

signature(object = "ocpt"): replaces pen.type slot

pen.value<-

signature(object = "ocpt"): replaces pen.value slot

print

signature(object = "ocpt"): prints details of the cpt object including summary

summary

signature(object = "ocpt"): prints a summary of the cpt object

plot

signature(object = "ocpt"): plots the ocpt object with changepoints highlighted

param

signature(object = "ocpt"): calculates the parameter estimates for the ocpt object

logLik

signature(object = "ocpt"): returns the overall log-likelihood of the ocpt object

Author(s)

Andrew Connell, Rebecca Killick, David Matteson

See Also

ocpt.np.initialise,ocpt.mean.initialise,ocpt.var.initialise,ocpt.meanvar.initialise

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
showClass("ecp.ocpt") # shows the structure of the ecp.ocpt class

x=new("ecp.ocpt") # creates a new object with the ecp.ocpt class defaults
estimates(x) # retrieves the ecp.ocpts slot from x

# Example of a change in variance at 100 in simulated normal data
set.seed(1)
x=matrix(c(rnorm(100,0,1),rnorm(100,0,10)),ncol=1)
ans=ocpt.np.initialise(x) 
print(ans) # prints details of the analysis including a summary
summary(ans)

rkillick/changepoint.online documentation built on Sept. 26, 2020, 11:01 p.m.