detect_cp_uni {BayesChange}R Documentation

Detect Change Points on an univariate time series.

Description

Detect Change Points on an univariate time series.

Usage

detect_cp_uni(
  data,
  n_iterations,
  q,
  phi,
  a,
  b,
  c,
  par_theta_c = 1,
  par_theta_d = 1,
  print_progress = TRUE,
  user_seed = 1234L
)

Arguments

data

vector of observations.

n_iterations

number of MCMC iteration.

q

probability of performing a split at each iterations.

phi

parameter \phi of the integrated likelihood function.

a, b, c

parameters of the Normal-Gamma prior for \mu and \lambda.

par_theta_c, par_theta_d

parameters of the shifted Gamma prior for \theta.

print_progress

If TRUE (default) print the progress bar.

user_seed

seed for random distribution generation.

Value

Function detect_cp_uni returns a list containing the following components:

Examples


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,
                            phi = 0.1, a = 1, b = 1, c = 0.1)

get_clust_VI(out$order)


[Package BayesChange version 1.1.2 Index]