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!
class_input(data, cpttype, method, test.stat, penalty, pen.value, minseglen,
param.estimates, out=list(), Q=NA, shape=NA)An object of class cpt or cpt.range as appropriate filled with the given attributes.
Data used in changepoint analysis, see cpt.mean for further details.
Type of changepoint analysis performed as a text string, e.g. "Mean", "Mean and Variance".
Method used as a text string, see cpt.mean for further details.
The assumed test statistic / distribution of the data as a text string. , see cpt.mean, cpt.meanvar or cpt.var for further details.
Penalty used as a text string, see cpt.mean for further details.
Numerical penalty value used in the analysis (positive).
Minimum segment length used in the analysis (positive integer).
Logical. If TRUE then parameter estimates are calculated. If FALSE no parameter estimates are calculated and the slot is blank in the returned object.
List of output from BINSEG, PELT or other method used. Function assumes that method and format of out match.
The value of Q used in the BinSeg or SegNeigh methods.
Value of the assumed known shape parameter required when test.stat="Gamma".
Rebecca Killick
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.
cpt.var,cpt.mean,plot-methods,cpt
#This function should only be used by developers, see its use in cpt.mean, cpt.var and cpt.meanvar.
Run the code above in your browser using DataLab