powered by
Applies the Pettitt step-change test
Pettitt(y)
A list with the following components:
numeric, p-value of the test
numeric, test statistics
numeric, xtra information: position of the step change
numeric vector, data
y=stats::rnorm(50) Pettitt(y) y[26:50]=y[26:50]+2 Pettitt(y)
Run the code above in your browser using DataLab