ocpt.reg-class: Class "ocpt.reg"

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

Description

A class for online changepoint objects, specifically change in regression.

Objects from the Class

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

new("ocpt", ...):

creates a new object with class ocpt

Slots

sumstat:

Object of class "numeric", the summary statistic matrix for the 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 online changepoints, default change in regression

test.stat:

Object of class "character", the test statistic used to analyse 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 online 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 online 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

cpts

signature(object = "ocpt.reg"): retrieves cpts slot

cpttype

signature(object = "ocpt.reg"): retrieves cpttype slot

sumstat

signature(object = "ocpt.reg"): retrieves sumstat slot

test.stat

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

ncpts.max

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

method

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

minseglen

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

param.est

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

pen.type

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

pen.value

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

cpts<-

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

cpttype<-

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

sumstat<-

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

test.stat<-

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

ncpts.max<-

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

method<-

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

param.est<-

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

pen.type<-

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

pen.value<-

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

print

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

summary

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

param

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

Author(s)

Andrew Connell Rebecca Killick

See Also

plot-methods,cpts-methods,ocpt

Examples

1
2
3
4
5
showClass("ocpt.reg")

x=new("ocpt.reg") # creates a new object with the cpt.reg class defaults
sumstat(x)  # retrieves the sumstat slot from x
sumstat(x)<-matrix(1:10,nrow=5,ncol=2) # replaces the sumstat slot from x with a matrix

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