I am currently trying to run Pettitts Test and the BU test on a time series. I have found the package (trend) and the tests. I am trying to run these tests using the code found in the help section of the test, however I am failing. May someone kindly assist with a code to do this. Below is the code for the BU test example. When I run it with my data I get this error: Error in na.fail.default(x) : missing values in object.
(out <- bu.test(Nile))
I have tried removing the NA's but still getting this error : Error in FUN(X[[i]], ...) :
only defined on a data frame with all numeric variables
In addition: Warning message:
In mean.default(x) : argument is not numeric or logical: returning NA