I am new in python time-series analysis. My target is to use the libraries in python to learn the parameters. When I get the parameters I can built equitions and use the model to any other programming language. Keeping it in mind, I bult an ARMA model using the following code and got the following summary using the summary2 method of ARMA model.

import pandas as pd
from statsmodels.tsa.arima_model import ARMA
from statsmodels.tsa.stattools import adfuller, arma_order_select_ic

ts = pd.Series(df2.total_rating, index=df2.index, )
model = ARMA(ts, order=(5, 7)) #5,7 is decided using arma_order_select_ic method
results = model.fit(trend='nc', method='css-mle')

enter image description here

My target is to get all the parameters shown in the following equation image of an ARMA model. As far I understand that for my case,$p$=5, $q$=7, $a_i$ = coef for ar.$L_i$, $X_{t-i}$ = values from the time series data, $b_i$ = coef for ma.$L_i$, and $E_{t-i}$ = Std.Err from ma.$L_i$. But I am confused where to get the value of $c$ and $\epsilon$$_t$?

enter image description here

Please let me know if my above assumptions are correct and also how to get value of c and $\epsilon$$_t$ from the summary?


Consider the given time series data:

date    total_rating
13-01-2016  316964
14-01-2016  353527
15-01-2016  334453
16-01-2016  221652
17-01-2016  198445
19-01-2016  331156
20-01-2016  328149
21-01-2016  ?

If I run the following python code, the predicted value for 21-01-2016 is 343003.648569:

predictedDF = results.predict(start='01/01/2016', end='03/02/2017')

My question is how this predicted value is calculated from the equation and the results summary given above. It will be a great help if you kindly put the values in the equation and show me the calculation. Thanks in advance.


2 Answers 2


Maybe it's been updated since you asked the question, but for me doing print(results.summary()) includes the constant, c, you described. My understanding is that epsilon is an error term so doesn't get assigned a value.

enter image description here


It would be helpful if you can specify the modeling library you are using to produce those results. That being said... $c$ is the constant you are going need to learn that parameter, or if you don't want a model with a constant just exclude it. Your $\epsilon$ term is the noise, in your results you'll see S.D. of Innovations this the standard deviation of the noise of your model so:

$$ \epsilon = \mathcal{N}(0, 25545.467^2) $$

It appears you're using python so be careful if you're drawing random samples from np.random.normal or stats.normal.rvs as they are parameterized as $N(\mu, \sigma)$ not $N(\mu, \sigma^2)$.

  • $\begingroup$ Thanks for your reply. It is good indication about $\epsilon$. However, I am a bit confused about the overall values. So, I have clarified the question by editing it. It will be a great help if you kindly answer accordingly. $\endgroup$ May 19, 2017 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.