NCAR / esmlab

Earth System Model Lab (esmlab). ⚠️⚠️ ESMLab functionality has been moved into <https://github.com/NCAR/geocat-comp>. ⚠️⚠️
https://esmlab.readthedocs.io
Apache License 2.0
24 stars 8 forks source link

significance tests #89

Open matt-long opened 5 years ago

matt-long commented 5 years ago

For our statistics functions, like weighted_cor it would be nice to enable computing significance metrics (p-value...).

@bradyrx, perhaps you can help with this?

bradyrx commented 5 years ago

@matt-long, yes I'd be happy to open a PR on this. Are you trying to keep esmlab slim on dependencies?

xskillscore has a pearson_r_p_value function that is based in numpy and written as an xarray ufunc. Although this only allows a two-tailed test.

I can also port over some functions from climpred (https://github.com/bradyrx/climpred/blob/master/climpred/stats.py) which accounts for autocorrelation in the time series by computing the effective sample size (Bretherton et al. 1999).

matt-long commented 5 years ago

I am fine with dependencies as long as they are good ones.

bradyrx commented 5 years ago

Implemented in https://github.com/NCAR/esmlab/pull/90, although should stay open until effective sample size is incorporated (will get on this when time allows).