Disclaimer: I don't have very much statistics experience.. I do have yearly climate data (yearly max temperature, total yearly precipitation...) for 200 years and want to perform the Mann-Kendall trend test using Python. The test assumes no serial correlation so I'm using autocorrelation plots to determine the lag and then use differencing to remove any seasonality. First question: is this an appropriate approach to assess and correct for seasonality for the Mann-Kendall trend test? I know that there is a seasonal Kendall trend test, but there's no function for python and I want to stick with using python without having to rewrite a function.

Also, in other examples I've seen the trend removed before seasonality is assessed.. however what I'm after is the trend... so should I remove the trend (like with a lag 1 differencing) prior to assessing seasonality? Then apply whatever lag I find from the no-trend data to the original data? What is the order of things? Will assessing seasonality with the trend still in my data affect how I interpret seasonality?

Figure shows raw data in blue, lowess in red and difference between raw data and lowess in green. The site is located in northern California and the "data" is model output from the Basin Characterization Model (BCM) (http://climate.calcommons.org/bcm). BCM output and lowess for Northern California site for April 1st snowpack http://climate.calcommons.org/bcm

  • $\begingroup$ The test assumes no serial correlation under the null. Asa general note, If 'your null' is inconsistent with the test's null, change the test, not the data. $\endgroup$ – user603 Jul 12 '18 at 22:37
  • $\begingroup$ In this specific case (which also include iid-ness & independence, much stronger tighter null than the mere no serial correlation you state btw), I do not really see how allowing random walks under the null makes much sense. Part of me wonders what could populate the set of alternatives of such a trend test;) $\endgroup$ – user603 Jul 12 '18 at 22:41
  • $\begingroup$ @user603 oh I see, so I would only need to investigate independence if there was no trend then..? or rather even choose a different test..? $\endgroup$ – happycampr Jul 12 '18 at 23:20
  • $\begingroup$ For seasonality: out of curiosity, what do you mean by seasonality when starting from yearly frequency data? Can you share the geographical location of these measurements? $\endgroup$ – user603 Jul 13 '18 at 10:42
  • $\begingroup$ I suppose I mean "cycles" not "seasons." Ultimately what I really want is for my data to fit any assumptions necessary to run the Mann-Kendall trend test, which from the following states constant variance and no serial correlation( page 327 pubs.usgs.gov/twri/twri4a3/pdf/chapter12.pdf). I'll also post the data. The site is in northern California. $\endgroup$ – happycampr Jul 13 '18 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.