getPValue: Get the empirical p-value for a new set of changepoints

View source: R/Empirical_P_Values.R

getPValueR Documentation

Get the empirical p-value for a new set of changepoints

Description

Obtains the p-value associated with introducing new changepoints beyond those already present for a series of observations.

Usage

getPValue(series, changepoints1, changepoints2, numTrials=10000)

Arguments

series

A vector of observations on which to run changepoint analysis. This vector must not contain any missing values.

changepoints1

The initial vector of changepoints. A changepoint is located immediately prior to a shift in the series.

changepoints2

A vector of changepoints to assess the significance of, relative to the initial vector.

numTrials

The number of simulations to use in order to obtain an empirical p-value. Recommended to at least be several thousand.

Details

This function is called by getChangepoints.

Value

Returns the empirical p-value (a numeric value between 0 and 1 inclusive).

Author(s)

Matthew Quinn

See Also

getChangepoints


matthewquinn1/changepointSelect documentation built on July 25, 2022, 7:12 p.m.