getCPtable: CVM change point model selection table

View source: R/getCPtable.R

getCPtableR Documentation

CVM change point model selection table

Description

Compares selected models with and without changes across a set of change points.

Usage

getCPtable(
  CPs,
  modelset,
  tidy = "strict",
  iterate = TRUE,
  spline = FALSE,
  criterion = "BIC",
  ...
)

Arguments

CPs

candidate change points

modelset

set of models to compare (combination of UCVM, ACVM, RCVM, RACVM, or all, which includes all of them)

tidy

criteria by which change points are retained or rejected. By default, filters by differences, meaning that if estimates on either side of a change point are outside of the 95% confidence interval bounds, the change point is considered significant. Other options are AIC and BIC, meaning that if the dAIC or dBIC of the change point model is negative, the change point is thrown out.

iterate

whether or not to continue removing candidate change points until the most parsimonious set is selected. Should, generally, be true.

spline

whether or not to use the spline approximation for the final estimate.

criterion

model selection criterion (choosing between UCVM, ACVM, etc.) - can be either BIC, AIC. Note, this is different from Change Point retention criterion (in tidy)

...

arguments to pass the testCP function, notably:

Value

a data frame with:

CP

index of change point

start,end

index of beginning and end of change point window

dAIC,dBIC

delta AIC and BIC values

differences

which - if any - of the estimated parameters are outside of the 95% range across the change point

models

which models are selected on either side of change point.

Examples

library(smoove)
library(magrittr)
data(simSweep, package="smoove")
simSweep %>% findCandidateChangePoints(clusterwidth = 2) %>%
getCPtable(modelset = c("UCVM", "ACVM"))

EliGurarie/smoove documentation built on June 2, 2025, 1:45 p.m.