Input all required arguments into cpt classes - Only intended for developer use.

Share:

Description

This function helps to input all the necessary information into the correct format for cpt and cpt.range classes.

This function is called by cpt.mean, cpt.var and cpt.meanvar when class=TRUE. This is not intended for use by regular users of the package. It is exported for developers to call directly for speed and convenience.

WARNING: No checks on arguments are performed!

Usage

1
2
class_input(data, cpttype, method, test.stat, penalty, pen.value, minseglen, 
param.estimates, out=list(), Q=NA, shape=NA)

Arguments

data

Data used in changepoint analysis, see cpt.mean for further details.

cpttype

Type of changepoint analysis performed as a text string, e.g. "Mean", "Mean and Variance".

method

Method used as a text string, see cpt.mean for further details.

test.stat

The assumed test statistic / distribution of the data as a text string. , see cpt.mean, cpt.meanvar or cpt.var for further details.

penalty

Penalty used as a text string, see cpt.mean for further details.

pen.value

Numerical penalty value used in the analysis (positive).

minseglen

Minimum segment length used in the analysis (positive integer).

param.estimates

Logical. If TRUE then parameter estimates are calculated. If FALSE no parameter estimates are calculated and the slot is blank in the returned object.

out

List of output from BINSEG, PELT or other method used. Function assumes that method and format of out match.

Q

The value of Q used in the BinSeg or SegNeigh methods.

shape

Value of the assumed known shape parameter required when test.stat="Gamma".

Details

This function takes all the input required for the cpt or cpt.range classes and enters it into the object.

This function is exported for developer use only. It does not perform any checks on inputs and is simply a convenience function for converting the output of the worker functions into a nice format for the cpt and cpt.range classes.

Value

An object of class cpt or cpt.range as appropriate filled with the given attributes.

Author(s)

Rebecca Killick

See Also

cpt.var,cpt.mean,plot-methods,cpt

Examples

1
#This function should only be used by developers, see its use in cpt.mean, cpt.var and cpt.meanvar.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.