Skip to content

Commit

Permalink
Update manual.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
scrat-online committed Jun 24, 2017
1 parent 3908121 commit 7417790
Showing 1 changed file with 161 additions and 0 deletions.
161 changes: 161 additions & 0 deletions docs/manual.rst
Original file line number Diff line number Diff line change
@@ -1 +1,162 @@
Manual pySTARMA library
================
This file contains the manual for the usage of the pySTARMA library

STARMA object
-----------------

Description
~~~~~~~~~~~~~~~~~~~~~~
The STARMA class can be used to estimate STARMA models. The method ``STARMA.fit()`` performs the estimation of the parameters. The method ``STARMA.predict()`` executes the forecast (still in the development stage). The method ``STARMA.get_model()`` returns the full model. The ``STARMA.get_item()`` method returns a selected property of the model (`see Return Values STARMA`_).

Usage
~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
model = sm.STARMA(p, q, ts_matrix, wa_matrices, iterations(optional))
model.fit()
model.get_model()
model.get_item()
Example
~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
from pySTARMA import starma_model as sm
#Create instance of STARMA
model = sm.STARMA(5, 2, time_series, wa_matrices, 3)
#Estimate parameters
model.fit()
#Print explicit item
print model.get_item('bic')
Attributes
~~~~~~~~~~~~~~~~~~~~~~
+---------------------+---------------------------------------------+
| Attribute | Value |
+=====================+=============================================+
|p |Number or list of autoregressive parameters |
+---------------------+---------------------------------------------+
|q | Number or list of moving average parameters |
+---------------------+---------------------------------------------+
|ts_matrix | Time series matrix |
+---------------------+---------------------------------------------+
|wa_matrices | List of adjacency matrices |
+---------------------+---------------------------------------------+
|iterations(optional) | Number of iteration of kalman filtering, |
| | only for estimation of moving average |
| | parameters |
+---------------------+---------------------------------------------+

Returnvalues
~~~~~~~~~~~~~~~~~~~~~~

.. _`see Return Values STARMA`:

A dictionary is returned as a 'model' with the following values:

+---------------------+---------------------------------------------+
| Value | Description |
+=====================+=============================================+
|residuals | Matrix with estimated residuals |
+---------------------+---------------------------------------------+
|phi | Matrix with estimated AR-parameters |
+---------------------+---------------------------------------------+
|phi_tvalue | Matrix with estimated AR-t-values |
+---------------------+---------------------------------------------+
|phi_pvalue | Matrix with estimated AR-p-values |
+---------------------+---------------------------------------------+
|theta | Matrix with estimated MA-parameters |
+---------------------+---------------------------------------------+
|theta_tvalue | Matrix with estimated MA-t-values |
+---------------------+---------------------------------------------+
|theta_pvalue | Matrix with estimated MA-p-values |
+---------------------+---------------------------------------------+
|sigma2 | Standard deviation |
+---------------------+---------------------------------------------+
|bic | Bayessche informationcriterion |
+---------------------+---------------------------------------------+

STARIMA object
-----------------

Description
~~~~~~~~~~~~~~~~~~~~~~
The STARIMA class can be used to estimate STARIMA models. The method ``STARIMA.fit()`` performs the estimation of the parameters. The method ``STARIMA.predict()`` executes the forecast (still in the development stage). The method ``STARIMA.get_model()`` returns the full model. The ``STARIMA.get_item()`` method returns a selected property of the model (`see Return Values STARIMA`_).

Usage
~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
model = sm.STARIMA(p, q, d, ts_matrix, wa_matrices, iterations(optional))
model.fit()
model.get_model()
model.get_item()
Example
~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
from pySTARMA import starma_model as sm
#Create instance of STARIMA
model = sm.STARMA(5, 2, (1,), time_series, wa_matrices, 3)
#Estimate parameters
model.fit()
#Print explicit item
print model.get_item('bic')
Attributes
~~~~~~~~~~~~~~~~~~~~~~
+---------------------+---------------------------------------------+
| Attribute | Value |
+=====================+=============================================+
|p |Number or list of autoregressive parameters |
+---------------------+---------------------------------------------+
|q | Number or list of moving average parameters |
+---------------------+---------------------------------------------+
|d | List of numbers of differentiatio |
+---------------------+---------------------------------------------+
|ts_matrix | Time series matrix |
+---------------------+---------------------------------------------+
|wa_matrices | List of adjacency matrices |
+---------------------+---------------------------------------------+
|iterations(optional) | Number of iteration of kalman filtering, |
| | only for estimation of moving average |
| | parameters |
+---------------------+---------------------------------------------+

Return Values
~~~~~~~~~~~~~~~~~~~~~~

.. _`see Returnvalues STARIMA`:

A dictionary is returned as a 'model' with the following values:


+---------------------+---------------------------------------------+
| Value | Description |
+=====================+=============================================+
|residuals | Matrix with estimated residuals |
+---------------------+---------------------------------------------+
|phi | Matrix with estimated AR-parameters |
+---------------------+---------------------------------------------+
|phi_tvalue | Matrix with estimated AR-t-values |
+---------------------+---------------------------------------------+
|phi_pvalue | Matrix with estimated AR-p-values |
+---------------------+---------------------------------------------+
|theta | Matrix with estimated MA-parameters |
+---------------------+---------------------------------------------+
|theta_tvalue | Matrix with estimated MA-t-values |
+---------------------+---------------------------------------------+
|theta_pvalue | Matrix with estimated MA-p-values |
+---------------------+---------------------------------------------+
|sigma2 | Standard deviation |
+---------------------+---------------------------------------------+
|bic | Bayessche informationcriterion |
+---------------------+---------------------------------------------+

0 comments on commit 7417790

Please sign in to comment.