#StackBounty: #r #time-series #p-value #trend #change-point Pettitt's Test for Change-Point Detection Showing P-Value Larger than 1

Bounty: 50

I am studying how to use the pettitt.test function from the trend package in R to detect change-point in a time-series. However, after testing this function on some example datasets, I noticed that sometimes the p-value is larger than one. Below is an example.


# Example vector
vec <- c(-0.2, -0.2, -1.8, -0.3, 1.5, -0.2, -0.2, 1.2, -1, 1.2, -1, -0.5, 1.1, -1.2)

        Pettitt's test for single change-point detection

data:  vec
U* = 17, p-value = 1.109
alternative hypothesis: two.sided
sample estimates:
probable change point at time K 

I thought the p-value should be a number from 0 to 1. Are there any reasons why this function generates a p-value larger than 1?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.