ENH: Import arima_process stuff into tsa.api #1426

merged 7 commits into from Oct 15, 2014


None yet

2 participants


Got sick of typing these imports. I did some minimal cleanups, including some variable renames to standardize things a bit, changes some methods to properties, and fixed some things that were obviously broken. This still needs rigorous testing, more docs, and examples, but I'm not going to do it right now.

When ready, will need to fix examples that rely on this and probably add to main docs.

jseabold commented Apr 5, 2014

This should check for stationarity (and invertibility?) when constructing the objects with an optional force argument to make it go through. Possibly separate force_stationary and force_invertible. It's a pain to check each time.

@josef-pkt josef-pkt commented on an outdated diff May 20, 2014
+ Notes
+ -----
+ As mentioned above, both the AR and MA components should include the
+ coefficient on the zero-lag. This is typically 1. Further, due to the
+ conventions used in signal processing used in signal.lfilter vs.
+ conventions in statistics for ARMA processes, the AR paramters should
+ have the opposite sign of what you might expect. See the examples below.
+ Examples
+ --------
+ >>> import numpy as np
+ >>> np.random.seed(12345)
+ >>> ar = np.array([.75, -.25])
+ >>> ma = np.array([.65, .35])
+ >>> arparams = np.r_[1, -ar] # add zero-lag and negate
+ >>> maparams = np.r_[1, ma] # add zero-lag
josef-pkt May 20, 2014 Member

this reverses the notation compared to the other parts
ar, ma are polynomial, arparams, maparams are just the coefficients for lags > 0

see from_estimation


I'm inclined to merge this for 0.6 since it's mainly just a cleanup and import.

@jseabold jseabold added this to the 0.6 milestone Sep 26, 2014
@jseabold jseabold merged commit 3196ccb into statsmodels:master Oct 15, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
@jseabold jseabold deleted the jseabold:arma-process-cleanup branch Oct 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment