class_input | R Documentation |
This function helps to input all the necessary information into the correct format for the pcpt
class.
This function is called by PeriodCPT
and its distribution specific functions. 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: Checks on inputs may not be comprehensive!
class_input(data, periodlength, minseglen, distribution, nsegparam,
Mprior, Mhyp, spread, inits, ...)
data |
A vector or ts object containing the data within which you which to find within period changepoint events. If not specified, the period length is taken from the ts object. |
periodlength |
Positive integer specifying the period length. Information is obtained from data ts-object if not specified. |
minseglen |
Positive integer giving the minumum segment length (no. of observations between within-period changes). |
distribution |
Character specifying the sampling distribution/statistic to investigate within period changepoint events. |
nsegparam |
Number of segment parameters per segment. |
Mprior |
Character specifying the prior for the number of within period changepoint events. |
Mhyp |
Numeric vector giving the hyper-parameters for the number of within period chagepoint prior. |
spread |
Positive number specifying the prior degree of spread around the period for the changepoint positions. |
inits |
Initial values for the chains. |
... |
Additional optional arguments that specifies prior details, MCMC parameters and output format. |
This function takes all the input required for the pcpt
class and enters it into the object.
This function is exported for developer use only. It perform some checks on inputs, but it is simply a convenience function for converting the output of the worker functions into a nice format for the pcpt
class.
An object of class pcpt
filled with the given attributes.
Simon Taylor Rebecca Killick
PeriodCPT
,pcpt
#This function should only be used by developers.
#See its use in PeriodCPT and distribution specific variations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.