decp {decp} | R Documentation |
Detect and Estimate Change Points
Description
Detect and estimate change points.
Usage
decp(
input_data,
alpha = 0.05,
num_simulations = 10000,
num_iterations = 100,
verbose = TRUE
)
Arguments
input_data |
A numeric matrix of observations for multivariate time series data where the dimension is not greater than the observations. Date columns should not be inputted. |
alpha |
Level of significance for calculating the confidence intervals |
num_simulations |
Specifies the number of simulations to be conducted during the estimation process. It is recommended to set num_simulations to a large value to ensure greater certainty and reliability of the results. A higher number of simulations helps in capturing the variability and improves the accuracy of the estimation. |
num_iterations |
Determines the size of the two-sided random walk in the estimation process (each path). If the jump size of the change point is small, num_iterations should be set to higher values to achieve accurate results. For jump size >= 1, the default value is 100. |
verbose |
Logical value indicating whether to print messages during the function execution. Default is TRUE. |
Value
An object of class 'decp_result' containing the ordered change points, the summary of the jump sizes for each pair of segments, the Confidence Interval (C.I.) of each detected change point, and warnings in case that the C.I. of two adjacent change points overlap.
Examples
# Example usage
data_part1 <- matrix(rnorm(1500, mean = 0, sd = 1), ncol = 5)
data_part2 <- matrix(rnorm(1500, mean = 3, sd = 1), ncol = 5)
data <- rbind(data_part1, data_part2)
result <- decp(data, alpha = 0.05, num_simulations = 100, num_iterations = 50)
print(result)