[SciPy-User] how to use kendalltau_seasonal
Andreas
andreas at hilboll.de
Wed Apr 6 10:36:15 EDT 2011
Hi,
thanks for the info!
> Imagine you need to check whether there's a trend in a time series X, but want to take a potential seasonal dependence into account.
> Reshape your data so that it's 2D, with seasons as columns, and feed it to the function.
Ah, good to know.
> You'll get a dictionary giving you the value of Kendall's tau (w/ and w/o the seasonal effects) with the corresponding p-values that should help you figure out without there's a trend in your data and whether seasonality plays a role.
Mhh. I think I do understand the statistics. However, I'm still not
totally sure about all the elements of the returned dictionary:
scipy.stats.mstats.kendalltau_seasonal(TT.reshape((15,12))).keys()
Out[39]:
['chi2 total',
'global tau (alt)',
'chi2 trend',
'seasonal tau',
'global p-value (dep)',
'global tau',
'global p-value (indep)',
'seasonal p-value']
Can you please shed some more light on this? Once I understand what the
function does, I'll be more than happy to document it ...
Cheers,
Andreas.
> Example:
> You have a 60-element array corresponding to 5 years of consecutive monthly data, and want to check the trend, taking potential monthly variations into account. In that case, your "season" is a month. Reshape it as a (5,12), and use the result as input to the function.
>
> More info:
> http://pubs.usgs.gov/sir/2005/5275/pdf/sir2005-5275.pdf
> Hirsch R.M., Slack J.R. and Smith R.A. (1982), Techniques of Trend Analysis
> for Monthly Water Quality Data, Water Resources Research 18(1), 107-12
>
> I'm sure there must be a R equivalent somewhere.
> In any case, please do help to document the function as needed. Don't hesitate to contact me if you need more info.
> Cheers
> P.
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
More information about the SciPy-User
mailing list