powered by
Detect Change Points on an univariate time series.
detect_cp_uni( data, n_iterations, q, a = 1, b = 1, c = 0.1, prior_var_phi = 0.1, prior_delta_c = 1, prior_delta_d = 1, print_progress = TRUE, user_seed = 1234L )
Function detect_cp_uni returns a list containing the following components:
detect_cp_uni
$orders a matrix where each row corresponds to the output order of the corresponding iteration.
$orders
time computational time in seconds.
time
$sigma_MCMC traceplot for \(\sigma\).
$sigma_MCMC
$sigma_MCMC_01 a \(0/1\) vector, the \(n\)-th element is equal to \(1\) if the proposed \(\sigma\) was accepted, \(0\) otherwise.
$sigma_MCMC_01
$delta_MCMC traceplot for \(\delta\).
$delta_MCMC
vector of observations.
number of MCMC iteration.
probability of performing a split at each iterations.
parameters of the Normal-Gamma prior for \(\mu\) and \(\lambda\).
parameters for the correlation coefficient in the likelihood.
parameters of the shifted Gamma prior for \(\delta\).
If TRUE (default) print the progress bar.
seed for random distribution generation.
data_vec <- as.numeric(c(rnorm(50,0,0.1), rnorm(50,1,0.25))) out <- detect_cp_uni(data = data_vec, n_iterations = 2500, q = 0.25)
Run the code above in your browser using DataLab