Learn R Programming

HydroPortailStats (version 1.1.0)

Pettitt: Pettitt Test

Description

Applies the Pettitt step-change test

Usage

Pettitt(y)

Value

A list with the following components:

pval

numeric, p-value of the test

stat

numeric, test statistics

xtra

numeric, xtra information: position of the step change

Arguments

y

numeric vector, data

Examples

Run this code
y=stats::rnorm(50)
Pettitt(y)
y[26:50]=y[26:50]+2
Pettitt(y)

Run the code above in your browser using DataLab