Code Monkey home page Code Monkey logo

mann-kendall-trend's People

Contributors

jonnycbb avatar kevdever avatar mps9506 avatar stijn27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mann-kendall-trend's Issues

Error message about unique values

Hi,

When running the MK function I am getting an error message on some datasets:
test_trend,h,p,z = mk_test(ts,alpha=0.05)
File "C:/Python/Anaconda/SA_Water/TrendTest_rainfall_seasonal_data.py", line 107, in mk_test
tp[i] = sum(unique_x[i] == x)
File "C:\Python\Anaconda\lib\site-packages\pandas\core\ops.py", line 741, in wrapper
if len(self) != len(other):
TypeError: len() of unsized object

Any ideas what this is about?

When it runs it is brilliant!!
Regards,

Darren

add two-sided or single sided test options

If null hypothesis = data comes from population with independent realizations and are identically distributed, the alternative hypothesis is that the data follows a monotonic trend. This is calculated with the two tailed test and currently implemented in the script.

However, if the alternative is indeed an "increasing trend" or "decreasing trend" (as currently returned in the script) p values should be calculated with the single tail of the distribution.

See:
Implementation in the trend package in R.

Suggest adding an argument for users to specify the alternative.

Thanks to Moshe Elitzur for identifying this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.