JiaYaobo / stamox

make your statistical research faster
https://jiayaobo.github.io/stamox/
Apache License 2.0
11 stars 0 forks source link

Autocorrelation and autocovariance #8

Open JeppeKlitgaard opened 1 year ago

JeppeKlitgaard commented 1 year ago

Hi @JiaYaobo

Stamox looks like a really nice project and I am looking for a JAX-compatible library that implements some more statistical tools than what is offered through the numpy and scipy interfaces.

Specifically I am looking for an implementation of the acf function from statsmodels: https://github.com/statsmodels/statsmodels/blob/0407c4e71c43766c155ed8e1f8ea5c3fbab035b1/statsmodels/tsa/stattools.py#L577

Would you be interested in implementing this in stamox? If I manage to find the time I would be happy to do a PR for this

JiaYaobo commented 1 year ago

@JeppeKlitgaard Hi, thanks for your attention and concern, stamox is now being in heavy development by myself, actually, I've implemented a primary version of acf months ago, but that's not included in stamox, and that's not efficeint, maybe I can pick it up, and it will be also very nice if you want to do a PR. I'm working on some infrastructure things like dataframe and formula evaluation compatible with jax.Array, anyway, feel free to open any PR or issue! For acf, maybe we can make a not that complex and comprehensive one compare to statsmodels first?

JeppeKlitgaard commented 1 year ago

I actually have a working acf and acovf based on the statsmodels version now. It doesn't support all the same parameters just yet, but should be doable.

How closely do you intend to match the statsmodels API with stamox?

JiaYaobo commented 1 year ago

@JeppeKlitgaard Principle is for functions,based on the feature of jax,to be as similar to statsmodels as possible,for classes,change from sm's or scipy's oop style to fp,which is similar to R,for acovf and acf,IIRC,deal with missing values is difficult to lift with jax,maybe we can skip dealing with missing (missing =none)for a primary version? WYDT?

JiaYaobo commented 1 year ago

BTW,I prefer to put 'acf' function in a 'correlation' module

instead of creating another 'tsa' module,how do you like it?🤔 @JeppeKlitgaard